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
kakao
Regular Visitor

Sum dinamically adjusted on filters

Hi 

 

I have a slicer for Company and I have to calculate the contribution of the below assets to the AUM of the selected companies.

 

For instance if on the slicer i select CH and IE then I will have to divide the AUM of each asset of CH and IE by the sum of all assets within comapnies CH and IE. 

 

If on the slicer i select CH and IT then I will have to divide the AUM of each asset  of CH and IT by the sum of all assets within comapnies CH and IT.

 

Basically the denominator will have to adjust dinamically to what is selected on the slicer. How can I implement this? 

 

Company

Asset                AUM 

CH

CH01            250,00 € 
CHCH02            100,00 € 
IEIE01            100,00 € 
IEIE02            500,00 € 
ITIT01            400,00 € 
ITIT02

            300,00 €

 

 

I tried the below but it does not work 

 

image.png

 

 

1 ACCEPTED SOLUTION

@kakao,

 

Try this:

 

Contribution = 
VAR vNumerator = [Total AUM]
VAR vDenominator =
    CALCULATE ( [Total AUM], ALLSELECTED () )
VAR vResult =
    DIVIDE ( vNumerator, vDenominator )
RETURN
    vResult

 

DataInsights_0-1675184735596.png

 





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

Proud to be a Super User!




View solution in original post

5 REPLIES 5
DataInsights
Super User
Super User

@kakao,

 

Try these measures:

 

Total AUM = SUM ( TEST[AUM] )
Contribution = 
VAR vNumerator = [Total AUM]
VAR vDenominator =
    CALCULATE ( [Total AUM], ALLSELECTED ( TEST ), VALUES ( TEST[Company] ) )
VAR vResult =
    DIVIDE ( vNumerator, vDenominator )
RETURN
    vResult

 

DataInsights_0-1675177030557.png

 





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

Proud to be a Super User!




Many Thanks @DataInsights . 

 

For asset CH01 I would expect controbution to be 0.263 (which should be the result of 250/950)

For asset CH02 I would expect controbution to be 0.105 (which should be the result of 100/950)

For asset IE01 I would expect controbution to be 0.105 (which should be the result of 100/950)

For asset IE02 I would expect controbution to be 0.526 (which should be the result of 500/950)

 

 

@kakao,

 

Try this:

 

Contribution = 
VAR vNumerator = [Total AUM]
VAR vDenominator =
    CALCULATE ( [Total AUM], ALLSELECTED () )
VAR vResult =
    DIVIDE ( vNumerator, vDenominator )
RETURN
    vResult

 

DataInsights_0-1675184735596.png

 





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

Proud to be a Super User!




Thanks @DataInsights , would you know how to implement this using columns? I would need the contribution as a column rather than a measure

@kakao,

 

A calculated column doesn't recognize slicer selections, so you would need to use a measure.





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

Proud to be a Super User!




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.