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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
rp2022
Helper I
Helper I

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

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

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

View solution in original post

3 REPLIES 3
v-shex-msft
Community Support
Community Support

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

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

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

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

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.