cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
mshparber Established Member
Established Member

Dynamic Previous Period Comparison

Hello friends,

I would like to build a measure that would compare Sales in a Current Period vs. Previous Period.

The catch here is I would like it to be dynamic, so when my user chooses a certain month, it will compare this month vs. previous.

When my user chooses a certain Quarter - it will compare vs. previous Quarter.

PARALLELPERIOD requires an interval value - but in my scenario - it could be either Month, Quarter, Year...

Any ideas?

Thanks!

Michael

4 REPLIES 4
Super User IV
Super User IV

Re: Dynamic Previous Period Comparison

I think it is doable, first create three measures for Previous month, quarter and year and then create one more measure which will look at what is selected (month, quarter or year), and based on that dynamically change the value of this measure. 

 

Just to clarify, you have slicer on your report to select month, quarter or year, correct?






Did I answer your question? Mark my post as a solution.

Proud to be a Datanaut! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.





Microsoft v-huizhn-msft
Microsoft

Re: Dynamic Previous Period Comparison

Hi @mshparber,

Could you please post some sample data or share .pbix file to us for further analysis? Based on your description, I am not reproduce your scenario. Thanks for your understanding.

 

Best Regards,
Angelia

ElaW Visitor
Visitor

Re: Dynamic Previous Period Comparison

I'm also experiencing a similar problem. I would like to display the data according to time X and its corresponding Previous period.
For example by the last 3 days, and accordingly the three days preceding them.

Suppose I show the scale between the 10th and the 13th of the month, so the previous period will be between 7 and 10.

The solution to be dynamic. That you can determine the amount of days / months / period on which I want to calculate, and accordingly will be calculated the period preceding it

Highlighted
jamie_yang Frequent Visitor
Frequent Visitor

Re: Dynamic Previous Period Comparison

I am running into the same problem and found this post really helpful:

http://radacad.com/previous-dynamic-period-dax-calculation

 

You can create dynamic previous period measures using DAX. 

 

However, I still think Power BI should provide this feature in the date slicer. If I have lots of measures that I want to allow my users to perfome this kind of comparisions, then I would have to create lots of previous period measures. That's too much work!

 

Here is the idea that you can vote:

https://ideas.powerbi.com/forums/265200-power-bi-ideas/suggestions/19129159-compare-to-previous-peri...

Helpful resources

Announcements
Exclusive LIVE Community Event #3 – Ask Arun Anything

Exclusive LIVE Community Event #3 – Ask Arun Anything

Join us in the third Triple A event!

Meet the 2020 Season 1 Power BI Super Users!

Meet the 2020 Season 1 Power BI Super Users!

It’s the start of a new Super User season! Learn all about the new Super Users and brand-new tiered recognition system.

Super User Challenge: Can You Solve These?

Super User Challenge: Can You Solve These?

We're celebrating the start of the New Super User season with our first ever Super User 'Can You Solve These?' challenge.

Power BI Desktop Update - February 2020

Power BI Desktop Update - February 2020

We are super excited for our update this month, as we are releasing two of our top community requests!

Power Platform Online Conference

Power Platform Online Conference

Join us for the first ever Power Platform Online Conference!

Top Solution Authors