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! Learn more

Reply
Anonymous
Not applicable

DAX Calculations

Hi all,

I have the following situation:

In my model there are 2 Tables "Hierachy" and "Values" that look roughly like this:

dennis_tegut_2-1594209298166.png

The Result Table i want to achive should look like this:

dennis_tegut_3-1594209363663.png

As the Calculations in the Hierachy are not just SUM(Previous Hierachy Level) i calculate the Values in Measures:

dennis_tegut_4-1594209430322.png

The results for the measures are fine. But i do not know how i get to my Result Table showing the Labels of different Hierachy Levels in one Column and the inherent values in another Column. What i tried was to do is:

Values = SWITCH(SELECTEDVALUE(Label), "AUM", [AUM], ....)

But this didnt work out.

 

Can anyone help me here please?

 

Regards 

Dennis

 

 

1 ACCEPTED SOLUTION
Icey
Community Support
Community Support

Hi @Anonymous ,

 

Sorry to reply late.

It is suggested to enter data to create a MeasureName table.

sort.jpg

 

And then create measures like so:

Sum = 
SWITCH (
    SELECTEDVALUE ( MeasureTable[MeasureName] ),
    "AUE", [AUE],
    "AUM", [AUM],
    "BUVE", [BUVE],
    "LPVKBW", [LPVKBW],
    "NU", [NU],
    "FOWE", [FOWE],
    "FOMI", [FOMI]
)
Sum% = 
SWITCH (
    SELECTEDVALUE ( MeasureTable[MeasureName] ),
    "AUE", [AUE]/100000,
    "AUM", [AUM]/100000,
    "BUVE", [BUVE]/100000,
    "LPVKBW", [LPVKBW]/100000,
    "NU", [NU]/100000,
    "FOWE", [FOWE]/100000,
    "FOMI", [FOMI]/100000
)

m.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

4 REPLIES 4
Icey
Community Support
Community Support

Hi @Anonymous ,

 

Is this what you want?

SHOW ON ROW.PNG

 

If so, just turn on "Show on rows" icon in the Matrix's Value field.

show on rows.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.

Anonymous
Not applicable

Hello @Icey ,

 

This is going in the direction i want it to be, thank you. Can you tell me if i can now get a heading for these columns? And what if i need another column? Like the % of the value (value / X)?

 

Regards,

Dennis

Icey
Community Support
Community Support

Hi @Anonymous ,

 

Sorry to reply late.

It is suggested to enter data to create a MeasureName table.

sort.jpg

 

And then create measures like so:

Sum = 
SWITCH (
    SELECTEDVALUE ( MeasureTable[MeasureName] ),
    "AUE", [AUE],
    "AUM", [AUM],
    "BUVE", [BUVE],
    "LPVKBW", [LPVKBW],
    "NU", [NU],
    "FOWE", [FOWE],
    "FOMI", [FOMI]
)
Sum% = 
SWITCH (
    SELECTEDVALUE ( MeasureTable[MeasureName] ),
    "AUE", [AUE]/100000,
    "AUM", [AUM]/100000,
    "BUVE", [BUVE]/100000,
    "LPVKBW", [LPVKBW]/100000,
    "NU", [NU]/100000,
    "FOWE", [FOWE]/100000,
    "FOMI", [FOMI]/100000
)

m.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.

amitchandak
Super User
Super User

@Anonymous , see if this can help

https://www.kasperonbi.com/use-isinscope-to-get-the-right-hierarchy-level-in-dax/

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

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