cancel
Showing results 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.

Helper V

## Dynamic period over period given drill down

Hi all,

I have a YoY% and MoM% measures that works great on their own. But if i use the YoY% measure and the visual is drilled down to the month, the measure looks at the prior year, instead of the prior month. How do i create a measure that looks at the visual drill down level to determine whether to use the YoY% measure or MoM% measure? Or is there a way to create a measure that looks at period over period based on the drilldown?

Good:

Not Good:

Thanks.

8 REPLIES 8

Hi, I know this a a very old post, but any chance you found a solution to this? I am facing the same issue.

Thank you!

Kevin

Helper V

Nope, I ended up giving up on it.

I think I found a solution! Unfortunately I can't remember where I got it from but it wasn't from me (this solution worked for me at least, hope it works for you as well if you still need/want it):

% Change  =
VAR CurrentPeriod = [Amount (\$)]
VAR PriorPeriod =
SWITCH(
TRUE(),
ISINSCOPE('Calendar'[Date].[Month]), CALCULATE([Amount (\$)], DATEADD('Calendar'[Date], -1, MONTH)),
ISINSCOPE('Calendar'[Date].[Year]), CALCULATE([Amount (\$)], DATEADD('Calendar'[Date], -1, YEAR))
)
RETURN
IF(CurrentPeriod = BLANK(), BLANK(), DIVIDE(
CurrentPeriod - PriorPeriod,
PriorPeriod
)
)
Helper V

very cool. ill give it a shot this week.

Of course you will need to add the quarters if you are using quarters in your period heirarchy; I do not use quarters nor days so I did not include those in my SWITCH() function.

Helper V

Any insight on how to create a dynamic period over period change when folks are drilling down into a visual?

Community Support

Hi , @airwolf39

Not very clear, can you  explain it with specific examples ?

Best Regards,
Community Support Team _ Eason

Helper V

I updated my post with screenshots. Thanks.

Announcements

#### 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

#### Power BI Monthly Update - April 2024

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

#### Fabric Community Update - April 2024

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

Top Solution Authors
Top Kudoed Authors