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
TallKewlOnez
Helper I
Helper I

I need to be able to take the totals from 2 visuals and use them in a formula

I have two visuals (each with different filters), then use the total from each in a separate column.

so I would like to be able to add a column  % of total expenses

 

salarys (table visual) (filter on label for aa,bb))

label       Amount    % of total expenses   

aa          $5             12.5 formula = 5/40×100

bb         $10           25 formula = 10/40×100

             $15  (t1 ) 

 

Misc Expenses     (table visual) (filter on label for cc,dd))

label         Amount    % of total (T1+T 2 (25+15) )   

cc            $15             37.5 formula = 15/40×100

dd           $10             25 formula = 10/40×100

       $25  (t2)   

 

Total Expenses = 40

 

Please help

 

1 ACCEPTED SOLUTION
Icey
Community Support
Community Support

Hi @TallKewlOnez ,

 

You need to use ALL to calculate the total value.

% of total = SUM ( 'Table'[Amount] ) / CALCULATE ( SUM ( 'Table'[Amount] ), ALL ( 'Table' ) )

total.PNG

 

Best Regards,

Icey

 

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

2 REPLIES 2
Icey
Community Support
Community Support

Hi @TallKewlOnez ,

 

You need to use ALL to calculate the total value.

% of total = SUM ( 'Table'[Amount] ) / CALCULATE ( SUM ( 'Table'[Amount] ), ALL ( 'Table' ) )

total.PNG

 

Best Regards,

Icey

 

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

 

lbendlin
Super User
Super User

I would create a new measure that adds ALLSELECTED(salaries) and ALLSELECTED(expenses), and that you can then use in the computation for the measure of the percentage against total.

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.