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

Get inspired! Check out the entries from the Power BI DataViz World Championships preliminary rounds and give kudos to your favorites. View the vizzies.

Reply
airwolf39
Helper V
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:

Data.PNG

 

Not Good:

formula.PNG

 

Thanks.

8 REPLIES 8
sd_kevin
Advocate II
Advocate II

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

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

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.

airwolf39
Helper V
Helper V

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

Hi , @airwolf39 

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

Best Regards,
Community Support Team _ Eason

 

I updated my post with screenshots. Thanks.

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!

FebPBI_Carousel

Power BI Monthly Update - February 2025

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

March2025 Carousel

Fabric Community Update - March 2025

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

Top Kudoed Authors