cancel
Showing results for
Search instead for
Did you mean:
Impactful Individual

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

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

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

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

#### New Ranks Launched March 24th!

The time has come: We are finally able to share more details on the brand-new ranks coming to the Power BI Community!

#### ‘Better Together’ Contest Finalists Announced!

Congrats to the finalists of our ‘Better Together’-themed T-shirt design contest! Click for the top entries.

#### Arun 'Triple A' Event Video, Q&A, and Slides

Missed the Arun 'Triple A' event or want to revisit it? We've got you covered! Check out the video, Q&A, and slides now.

#### Join THE global Power Platform event series.

Attend for two days of expert-led learning and innovation on topics like AI and Analytics, powered by Dynamic Communities.

#### Community Summit North America

Innovate, Collaborate, Grow. The top training and networking event across the globe for Microsoft Business Applications

Top Solution Authors
Top Kudoed Authors