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

Score big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount

Reply
Anonymous
Not applicable

Summing quantity between price changes

Hi,

 

Need some help with the DAX for this if anyone can assist.

 

I have historical sales data where I need to sum all quantities sold between price changes.

 

e.g.

 

SKUDate (DD/MM/YYYY)QtyPrice
A02/01/2020121.25
A06/01/2020141.20
A08/01/2020201.20
A09/01/2020151.20
A11/01/2020121.25
A13/01/202081.25
A16/01/2020121.20

 

So ideally I should see the following:

 

SKUDate (DD/MM/YYYY)QtyPrice
A02/01/2020121.25
A06/01/2020491.20
A11/01/2020201.25
A16/01/2020121.20

 

Any ideas?

 

Cheers.

2 ACCEPTED SOLUTIONS
Jihwan_Kim
Super User
Super User

Hi, @Anonymous 

 

Please check the below picture and the sample pbix file's link down below.

You can follow the steps to have the result column that is shown on the very right side of the table visualization.

 

All measures are in the sample pbix file.

 

Picture3.png

 

https://www.dropbox.com/s/ptqhzju0j9kt6a2/aexley.pbix?dl=0 

 

 

Hi, My name is Jihwan Kim.

If this post helps, then please consider accept it as the solution to help other members find it faster, and give a big thumbs up.


If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Click here to visit my LinkedIn page

Click here to schedule a short Teams meeting to discuss your question.

View solution in original post

Hi, @Anonymous 

 

Please check the below picture and the sample pbix file's link down below.

 

Picture1.png

 

https://www.dropbox.com/s/ptqhzju0j9kt6a2/aexley.pbix?dl=0 

 

Hi, My name is Jihwan Kim.

If this post helps, then please consider accept it as the solution to help other members find it faster, and give a big thumbs up.

 

 


If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Click here to visit my LinkedIn page

Click here to schedule a short Teams meeting to discuss your question.

View solution in original post

3 REPLIES 3
Jihwan_Kim
Super User
Super User

Hi, @Anonymous 

 

Please check the below picture and the sample pbix file's link down below.

You can follow the steps to have the result column that is shown on the very right side of the table visualization.

 

All measures are in the sample pbix file.

 

Picture3.png

 

https://www.dropbox.com/s/ptqhzju0j9kt6a2/aexley.pbix?dl=0 

 

 

Hi, My name is Jihwan Kim.

If this post helps, then please consider accept it as the solution to help other members find it faster, and give a big thumbs up.


If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Click here to visit my LinkedIn page

Click here to schedule a short Teams meeting to discuss your question.
Anonymous
Not applicable

That's awesome! Thanks @Jihwan_Kim .

 

If you're up for helping I'm trying to add the a Price Elasticity of Demand (PED) formula to the table.

 

PED = [ (Q1 - Q0) / (Q1 + Q0) ] / [ (P1 - P0) / (P1 + P0) ]

  • P₀ is the initial price of the product;
  • P₁ is the final price of the product;
  • Q₀ is the initial demand;
  • Q₁ is the demand after the price change;
  • PED is the price elasticity of demand.

This would make the table look like this:

msedge_5wBMgoIvRU.png

Hi, @Anonymous 

 

Please check the below picture and the sample pbix file's link down below.

 

Picture1.png

 

https://www.dropbox.com/s/ptqhzju0j9kt6a2/aexley.pbix?dl=0 

 

Hi, My name is Jihwan Kim.

If this post helps, then please consider accept it as the solution to help other members find it faster, and give a big thumbs up.

 

 


If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Click here to visit my LinkedIn page

Click here to schedule a short Teams meeting to discuss your question.

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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