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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
bcharlto
Frequent Visitor

Rolling Max Price Calculations

I'm trying to apply the rolling sum calculations (http://www.powerpivotpro.com/2013/07/moving-averages-sums-etc/) to price, but having difficulty. I'm trying to build a "RegularPrice" field that is based on the max average price for a product sold at store level over the course of 12 weeks (84 days). I have tried the printscreen attached, but you can see, as average price goes down, so does the regular price... Can anyone help me master this one?

 

 

Untitled.png

 

1 ACCEPTED SOLUTION
bcharlto
Frequent Visitor

Maybe this was just a glitch as I'm working with over 2 million rows of data... It looks to be working now. Cheers

View solution in original post

2 REPLIES 2
bcharlto
Frequent Visitor

Maybe this was just a glitch as I'm working with over 2 million rows of data... It looks to be working now. Cheers

bcharlto
Frequent Visitor

The secondary point here is that I want this to be a table I can reference to bring the "RegularPrice" field into my main query. This could be easier with a seperate SQL query, so let me know if you have a better SQL formula that I should use to calculate RegularPrice as defined above... Kind regards,

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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