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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
dgilm33
Helper I
Helper I

How to create a Calculate All from separate tables?

Hello,

I'm trying to create a % to put in a table where the formula is a Calculate All. I'm calcuating the sum in one table, but the All columns are coming from a second table. I've tried doing this with both columns and measures but both ways the %'s come back as 100% on every row. I apolgoize as I can't share the data. An example of what I'm trying to accomplish would be like below:

Table 1:                        Table 2:
Calculated Spend        Name
                                    Address
                                    Phone Number
Var Spend = Calculate(Sum(Calculated Spend))
Var TotalSpend = Calculate(Sum(Calculated Spend), ALL(Name, Address, Phone Number))
Return DIVIDE(Spend, TotalSpend)

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @dgilm33 ,

Please have a try.

Modify the measure.

Measure =
VAR Spend =
    CALCULATE ( SUM ( Table1[Calculated Spend] ) )
VAR TotalSpend =
    CALCULATE (
        SUM ( Table1[Calculated Spend] ),
        FILTER (
            ALL ( Table2 ),
            Table2[name] = SELECTEDVALUE ( Table2[name] )
                && Table2[adress] = SELECTEDVALUE ( Table2[adress] )
                && Table2[phone number] = SELECTEDVALUE ( Table2[phone number] )
        )
    )
RETURN
    DIVIDE ( Spend, TotalSpend )

vrongtiepmsft_0-1684129275087.png

How to Get Your Question Answered Quickly 

 

If it does not help, please provide more details with your desired output and pbix file without privacy information (or some sample data) .

 

Best Regards
Community Support Team _ Rongtie

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

1 REPLY 1
Anonymous
Not applicable

Hi @dgilm33 ,

Please have a try.

Modify the measure.

Measure =
VAR Spend =
    CALCULATE ( SUM ( Table1[Calculated Spend] ) )
VAR TotalSpend =
    CALCULATE (
        SUM ( Table1[Calculated Spend] ),
        FILTER (
            ALL ( Table2 ),
            Table2[name] = SELECTEDVALUE ( Table2[name] )
                && Table2[adress] = SELECTEDVALUE ( Table2[adress] )
                && Table2[phone number] = SELECTEDVALUE ( Table2[phone number] )
        )
    )
RETURN
    DIVIDE ( Spend, TotalSpend )

vrongtiepmsft_0-1684129275087.png

How to Get Your Question Answered Quickly 

 

If it does not help, please provide more details with your desired output and pbix file without privacy information (or some sample data) .

 

Best Regards
Community Support Team _ Rongtie

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors