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

Get certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now

Reply
afaro
Helper III
Helper III

Different measures for different drill downs/ups?

I have a measure for day on day change. I converted the date to date hierachy and obvious for the day, it works perfect. However, when I drill up my charts to month or quarter or year level then it doesn't show the month on month change right values which makes sense given the measure is day on day. Is there a way to make the measure being applied to also change to month on month, quarter on quarter or year on year depending on the drill view? 

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @afaro ,

Create Separate Measures for Each Time Granularity: You'll need to create individual measures for day on day, month on month, quarter on quarter, and year on year changes. Each of these measures will calculate the change based on the respective time granularity.

 

Use SWITCH() or IF() Statements for Dynamic Measure Selection: To dynamically switch between these measures based on the current drill level, you can use a combination of SWITCH() or IF() statements within a new measure. This measure will check the current drill level and return the appropriate measure.

Dynamic Change Measure = 
SWITCH(
    TRUE(),
    ISINSCOPE('Date'[Day]), [Day on Day Change],
    ISINSCOPE('Date'[Month]), [Month on Month Change],
    ISINSCOPE('Date'[Quarter]), [Quarter on Quarter Change],
    ISINSCOPE('Date'[Year]), [Year on Year Change],
    BLANK()
)

 

How to Get Your Question Answered Quickly - Microsoft Fabric Community

 

If it does not help, please provide more details with your desired output and pbix file without privacy information (or some sample data) .

 

Best Regards
Community Support Team _ Rongtie

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

1 REPLY 1
Anonymous
Not applicable

Hi @afaro ,

Create Separate Measures for Each Time Granularity: You'll need to create individual measures for day on day, month on month, quarter on quarter, and year on year changes. Each of these measures will calculate the change based on the respective time granularity.

 

Use SWITCH() or IF() Statements for Dynamic Measure Selection: To dynamically switch between these measures based on the current drill level, you can use a combination of SWITCH() or IF() statements within a new measure. This measure will check the current drill level and return the appropriate measure.

Dynamic Change Measure = 
SWITCH(
    TRUE(),
    ISINSCOPE('Date'[Day]), [Day on Day Change],
    ISINSCOPE('Date'[Month]), [Month on Month Change],
    ISINSCOPE('Date'[Quarter]), [Quarter on Quarter Change],
    ISINSCOPE('Date'[Year]), [Year on Year Change],
    BLANK()
)

 

How to Get Your Question Answered Quickly - Microsoft Fabric Community

 

If it does not help, please provide more details with your desired output and pbix file without privacy information (or some sample data) .

 

Best Regards
Community Support Team _ Rongtie

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

 

 

 

 

Helpful resources

Announcements
November Carousel

Fabric Community Update - November 2024

Find out what's new and trending in the Fabric Community.

Live Sessions with Fabric DB

Be one of the first to start using Fabric Databases

Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.

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! Early Bird pricing ends December 9th.

Nov PBI Update Carousel

Power BI Monthly Update - November 2024

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