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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
211PVM112
New Member

Price Volume Effect with customizable timeperiod, and dynamic with rest of dataset

Hi,

Hope there are anyone who could/would like to help me with a question I have related to PVM analysis with customizable time period, and dynamic with the rest of the dataset at the same time.

I have a whole dataset with different business-related data (customer, product, order), all connecting to one sales table through relations and separate DimKeys.

What I would like to do is to create a price volume mix measure which calculates on a product level. I have seen many solutions to do this by using VAR and order. But the problem is that all of the once I have seen relates to Current Years vs Previous Year. I would like to create a model which allow me to use any two periods I would like. For example, the PVM analysis on a product level for year 2016 vs year 2020 (not 2016 to 2020) or March 2018 vs. June 2019 and so on.

On other words:
A PVM analysis on a product level with any two different time baselines, which is connected to the rest of that data set and changes dynamically according to filters such as customers or product segment. I would like to make the end user be able to choose any start and end period for the PVM calculation, directly in the Dashboard. Is there a way to do so? Or is there a constraint on the time period which makes it difficult?

Thank you very much.

1 REPLY 1
Greg_Deckler
Super User
Super User

 Well, it sounds like what you need are 2 disconnected tables with your years listed. Then, you could do something below. Obviously, this is just a sample on how to compare to different years.

Measure = 
  VAR __Year1 = SELECTEDVALUE('YearsTable1'[Year])
  VAR __Year2 = SELECTEDVALUE('YearsTable2'[Year])
  VAR __Table = FILTER(ALLSELECTED('Table')
  VAR __Table1 = FILTER(__Table,YEAR([Date]) = __Year1)
  VAR __Table2 = FILTER(__Table,YEAR([Date]) = __Year2)
RETURN
  SUMX(__Table1) - SUMX(__Table2)

@211PVM112



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
Power BI Cookbook Third Edition (Color)

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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