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
rp2022
Helper II
Helper II

Help with some measures

Sample the excel file with data.

rp2022_0-1716576307746.png

 

 

I need to get 2 measures:

1. Calculate running total summing up everything to the End of the Year based on Label. (should work in a table or matrix visual with any level of detail) But also, keep PD and PDY separate from the running total. The totalling start from Label="ST" and cummulative after that till the end of the year.

 

2. A Cummulative total until Nov end and then show how values might influence in Dec for DELK level detail. Hierarchy is R -> P-> Prod -> Area -> DELK, also based on Label

 

I have a current measure for #1, but when i bring details into the visual like Prod, the values are all the same.

rp2022_1-1716576358879.png

 

Any help is appreciated

1 ACCEPTED SOLUTION
Anonymous
Not applicable

HI @rp2022,

You can use switch function or if statement to check current hierarchy levels, then you can use this to redirect to different calculations based on current level and use these logic formulas into the same measure.

Regards,

Xiaoxin Sheng

View solution in original post

3 REPLIES 3
Anonymous
Not applicable

HI @rp2022,

I'd like to suggest you take a look at the following link to know how to use dax expression to check the hierarchy level:

Clever Hierarchy Handling in DAX - SQLBI

Then you can write different formula based on current level to calculate cumulative results.

Regards,
Xiaoxin Sheng

I do not wish to create a measure for each level. I want one measure that works for all levels

Anonymous
Not applicable

HI @rp2022,

You can use switch function or if statement to check current hierarchy levels, then you can use this to redirect to different calculations based on current level and use these logic formulas into the same measure.

Regards,

Xiaoxin Sheng

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

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!

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