Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply

Measure Help Across Tables With Bridge

Hello - 

 

I need some assistance with calculating a measure. Here is what I have:

 

Table A:

 

Capture.PNG

 

Table B:

 

Capture2.PNG

 

These two tables are joined through a bridge table by Account Number/Billing Telephone Number as both have repeating acocunt numbers and EOM Load Date values. There are other tables joined through the bridge table as well.

 

What I want to do on Table A is:

 

SUM(USOC_Charges) from Table B If A.EOM Load Date=B.EOM_Load_Date. Account Number would also be equal to Billing Telephone Number but I think that is acomplished through the bridge table.

 

I have tried SUMX, Calculate(Sum(Filter(... a few other things but for the life of me cannot figure out how to get this to work.

 

Any help is appreciated.

 

Matt

1 ACCEPTED SOLUTION

Hi @matthew_hampton

 

Create relationships between Table A and Table B by Bridge Table

 

1.png

 

Calculate sum of USOC Charges where AccountID = AccountID and EOM Load Date = EOM Load Date

 

Measure =
CALCULATE (
    SUM ( Sheet2[ USOC_Charge ] ),
    FILTER (
        ALL ( Sheet2 ),
        [AccountID] = SELECTEDVALUE ( Sheet2[AccountID] )
            && [EOM Load Date] = SELECTEDVALUE ( Sheet2[EOM Load Date] )
    )
)

 

2.png

 

How do you want to use Period (in Table A) in visualization?

How does Period (in Table A) affect sum of USOC Charges? Could you make me clear about these?

 

Best Regards

Maggie

 

View solution in original post

3 REPLIES 3
MFelix
Super User
Super User

Hi @matthew_hampton,

 

Can you provide your data in a table format or an in Excel format as you can imagine to duplicate the information you have and give you some help is difficult to replicate the data you have by images only, also provide the bridge table and expected result.

 

Thank you.

 

Regards,

MFelix


Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português



Hi @MFelix

 

Attached are three Excel snapshots of the table structure.

 

What I am looking to do is create visualizations using Period (in Table A) where USOC Charges (In Table B) are summed where AccountID = AccountID and EOM Load Date = EOM Load Date. That will tie charges to an account number at a specified period.

 

Bridge Table:

 

AccountID
12345
56789
98765

 

 

Table A

 

AccountIDEOM Load DatePeriod
123453/1/18 12:00 AM-1
123454/1/18 12:00 AM0
123455/1/18 12:00 AM1
123456/1/18 12:00 AM2
123457/1/18 12:00 AM3
123458/1/18 12:00 AM4
123459/1/18 12:00 AM5
1234510/1/18 12:00 AM6
1234511/1/18 12:00 AM7
1234512/1/18 12:00 AM8
123451/1/19 12:00 AM9
123452/1/19 12:00 AM10
123453/1/19 12:00 AM11
123454/1/19 12:00 AM12
567893/1/18 12:00 AM-1
567894/1/18 12:00 AM0
567895/1/18 12:00 AM1
567896/1/18 12:00 AM2
567897/1/18 12:00 AM3
567898/1/18 12:00 AM4
567899/1/18 12:00 AM5
5678910/1/18 12:00 AM6
5678911/1/18 12:00 AM7
5678912/1/18 12:00 AM8
567891/1/19 12:00 AM9
567892/1/19 12:00 AM10
567893/1/19 12:00 AM11
567894/1/19 12:00 AM12
987651/1/18 12:00 AM-1
987652/1/18 12:00 AM0
987653/1/18 12:00 AM1
987654/1/18 12:00 AM2
987655/1/18 12:00 AM3
987656/1/18 12:00 AM4
987657/1/18 12:00 AM5
987658/1/18 12:00 AM6
987659/1/18 12:00 AM7
9876510/1/18 12:00 AM8
9876511/1/18 12:00 AM9
9876512/1/18 12:00 AM10
987651/1/19 12:00 AM11
987652/1/19 12:00 AM

12

 

Table B

 

AccountIDEOM Load Date USOC_Charge 
123453/1/18 12:00 AM $              77.55
123454/1/18 12:00 AM $              22.62
123455/1/18 12:00 AM $              69.33
123456/1/18 12:00 AM $              78.06
123457/1/18 12:00 AM $                0.70
123458/1/18 12:00 AM $           118.66
123459/1/18 12:00 AM $              94.46
1234510/1/18 12:00 AM $              92.28
1234511/1/18 12:00 AM $              76.57
1234512/1/18 12:00 AM $              60.30
123451/1/19 12:00 AM $              64.74
123452/1/19 12:00 AM $              29.28
123453/1/19 12:00 AM $              33.94
123454/1/19 12:00 AM $           117.38
567893/1/18 12:00 AM $              55.13
567894/1/18 12:00 AM $              26.41
567895/1/18 12:00 AM $           109.21
567896/1/18 12:00 AM $                9.35
567897/1/18 12:00 AM $              27.80
567898/1/18 12:00 AM $           106.71
567899/1/18 12:00 AM $              32.18
5678910/1/18 12:00 AM $              72.95
5678911/1/18 12:00 AM $           100.94
5678912/1/18 12:00 AM $              35.34
567891/1/19 12:00 AM $              86.40
567892/1/19 12:00 AM $              95.15
567893/1/19 12:00 AM $              57.72
567894/1/19 12:00 AM $              19.50
987651/1/18 12:00 AM $              56.95
987652/1/18 12:00 AM $                1.41
987653/1/18 12:00 AM $           104.44
987654/1/18 12:00 AM $              92.68
987655/1/18 12:00 AM $              44.42
987656/1/18 12:00 AM $           113.94
987657/1/18 12:00 AM $              24.90
987658/1/18 12:00 AM $              55.38
987659/1/18 12:00 AM $              76.33
9876510/1/18 12:00 AM $              47.40
9876511/1/18 12:00 AM $                3.56
9876512/1/18 12:00 AM $              68.52
987651/1/19 12:00 AM $              71.79
987652/1/19 12:00 AM $              77.53
123453/1/18 12:00 AM $              60.96
123454/1/18 12:00 AM $           103.70
123455/1/18 12:00 AM $              76.17
123456/1/18 12:00 AM $              60.20
123457/1/18 12:00 AM $              50.82
123458/1/18 12:00 AM $              99.11
123459/1/18 12:00 AM $              94.23
1234510/1/18 12:00 AM $              23.97
1234511/1/18 12:00 AM $              60.65
1234512/1/18 12:00 AM $              66.46
123451/1/19 12:00 AM $           113.50
123452/1/19 12:00 AM $           117.31
123453/1/19 12:00 AM $              70.51
123454/1/19 12:00 AM $              69.50
567893/1/18 12:00 AM $           101.76
567894/1/18 12:00 AM $              47.67
567895/1/18 12:00 AM $              21.09
567896/1/18 12:00 AM $              43.91
567897/1/18 12:00 AM $              34.22
567898/1/18 12:00 AM $           114.06
567899/1/18 12:00 AM $              91.24
5678910/1/18 12:00 AM $              70.55
5678911/1/18 12:00 AM $              37.39
5678912/1/18 12:00 AM $              45.25
567891/1/19 12:00 AM $              97.57
567892/1/19 12:00 AM $              19.61
567893/1/19 12:00 AM $              58.42
567894/1/19 12:00 AM $           106.59
987651/1/18 12:00 AM $              97.24
987652/1/18 12:00 AM $              25.53
987653/1/18 12:00 AM $              65.36
987654/1/18 12:00 AM $           112.28
987655/1/18 12:00 AM $                7.49
987656/1/18 12:00 AM $              55.21
987657/1/18 12:00 AM $              96.36
987658/1/18 12:00 AM $              20.20
987659/1/18 12:00 AM $              11.71
9876510/1/18 12:00 AM $              54.52
9876511/1/18 12:00 AM $              55.53
9876512/1/18 12:00 AM $              14.94
987651/1/19 12:00 AM $                6.33
987652/1/19 12:00 AM $              37.64
123453/1/18 12:00 AM $              89.76
123454/1/18 12:00 AM $              69.25
123455/1/18 12:00 AM $              63.32
123456/1/18 12:00 AM $              65.18
123457/1/18 12:00 AM $              65.86
123458/1/18 12:00 AM $           106.23
123459/1/18 12:00 AM $              51.29
1234510/1/18 12:00 AM $              65.64
1234511/1/18 12:00 AM $           102.04
1234512/1/18 12:00 AM $              68.47
123451/1/19 12:00 AM $              47.55
123452/1/19 12:00 AM $              99.94
123453/1/19 12:00 AM $              75.78
123454/1/19 12:00 AM $              41.39
567893/1/18 12:00 AM $                5.50
567894/1/18 12:00 AM $              56.80
567895/1/18 12:00 AM $           112.26
567896/1/18 12:00 AM $              32.94
567897/1/18 12:00 AM $              22.11
567898/1/18 12:00 AM $              34.50
567899/1/18 12:00 AM $              60.07
5678910/1/18 12:00 AM $              48.60
5678911/1/18 12:00 AM $           117.86
5678912/1/18 12:00 AM $                1.63
567891/1/19 12:00 AM $                7.50
567892/1/19 12:00 AM $              24.54
567893/1/19 12:00 AM $              48.61
567894/1/19 12:00 AM $           119.79
987651/1/18 12:00 AM $              81.06
987652/1/18 12:00 AM $              21.01
987653/1/18 12:00 AM $                4.22
987654/1/18 12:00 AM $              18.24
987655/1/18 12:00 AM $              97.74
987656/1/18 12:00 AM $              35.11
987657/1/18 12:00 AM $              65.60
987658/1/18 12:00 AM $              83.68
987659/1/18 12:00 AM $              83.75
9876510/1/18 12:00 AM $           104.29
9876511/1/18 12:00 AM $              62.05
9876512/1/18 12:00 AM $              67.64
987651/1/19 12:00 AM $              87.09
987652/1/19 12:00 AM $              59.23
123453/1/18 12:00 AM $              32.63
123454/1/18 12:00 AM $                3.61
123455/1/18 12:00 AM $              16.01
123456/1/18 12:00 AM $              38.17
123457/1/18 12:00 AM $              16.29
123458/1/18 12:00 AM $              76.40
123459/1/18 12:00 AM $              77.10
1234510/1/18 12:00 AM $              86.67
1234511/1/18 12:00 AM $              78.53
1234512/1/18 12:00 AM $              29.82
123451/1/19 12:00 AM $              64.31
123452/1/19 12:00 AM $           108.67
123453/1/19 12:00 AM $           104.45
123454/1/19 12:00 AM $              64.22
567893/1/18 12:00 AM $              30.77
567894/1/18 12:00 AM $           105.79
567895/1/18 12:00 AM $           110.69
567896/1/18 12:00 AM $              29.00
567897/1/18 12:00 AM $                9.79
567898/1/18 12:00 AM $              28.39
567899/1/18 12:00 AM $              59.57
5678910/1/18 12:00 AM $              48.82
5678911/1/18 12:00 AM $                9.41
5678912/1/18 12:00 AM $              70.07
567891/1/19 12:00 AM $              20.06
567892/1/19 12:00 AM $              99.93
567893/1/19 12:00 AM $              57.90
567894/1/19 12:00 AM $              64.26
987651/1/18 12:00 AM $              67.86
987652/1/18 12:00 AM $              53.07
987653/1/18 12:00 AM $              39.21
987654/1/18 12:00 AM $              84.36
987655/1/18 12:00 AM $                6.87
987656/1/18 12:00 AM $              44.89
987657/1/18 12:00 AM $           101.80
987658/1/18 12:00 AM $              41.34
987659/1/18 12:00 AM $              31.54
9876510/1/18 12:00 AM $              22.20
9876511/1/18 12:00 AM $              19.28
9876512/1/18 12:00 AM $              48.96
987651/1/19 12:00 AM $           110.47
987652/1/19 12:00 AM $              20.66

 

I could not figure out how to attach an Excel file so if this does not help, please let me know and I will provide sample data another way.

 

Matt

Hi @matthew_hampton

 

Create relationships between Table A and Table B by Bridge Table

 

1.png

 

Calculate sum of USOC Charges where AccountID = AccountID and EOM Load Date = EOM Load Date

 

Measure =
CALCULATE (
    SUM ( Sheet2[ USOC_Charge ] ),
    FILTER (
        ALL ( Sheet2 ),
        [AccountID] = SELECTEDVALUE ( Sheet2[AccountID] )
            && [EOM Load Date] = SELECTEDVALUE ( Sheet2[EOM Load Date] )
    )
)

 

2.png

 

How do you want to use Period (in Table A) in visualization?

How does Period (in Table A) affect sum of USOC Charges? Could you make me clear about these?

 

Best Regards

Maggie

 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.