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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
hibarrbm
Helper I
Helper I

Calculating the moving average of previous 6 weeks sales compared to last week sales

I need help calculate the variance between last week's sales vs. the average total of the prior 6 weeks. I've seen and found formulas that does it by day but my data only comes in fiscal weeks (Sun-Sat). Please Help!

 

Goal 1: Total last weeks sales - Avg. Total of prior 6 weeks = $ Variance

and

Goal 2: Total last week sales / Avg. Total of prior 6 weeks -1 = % Variance 

 

1 ACCEPTED SOLUTION
Jihwan_Kim
Super User
Super User

Hi, @hibarrbm 

Please check the below pictures and the sample pbix file's link down below, whether it is what you are looking for.

all measures are written in the sample pbix file.

 

Picture2.pngPicture3.png

 

https://www.dropbox.com/s/vd7ztj87pqs58m7/hibarrbm.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.


Go to My LinkedIn Page


View solution in original post

3 REPLIES 3
Jihwan_Kim
Super User
Super User

Hi, @hibarrbm 

Please check the below pictures and the sample pbix file's link down below, whether it is what you are looking for.

all measures are written in the sample pbix file.

 

Picture2.pngPicture3.png

 

https://www.dropbox.com/s/vd7ztj87pqs58m7/hibarrbm.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.


Go to My LinkedIn Page


This worked perfectly! thanks so much

hibarrbm
Helper I
Helper I

Just to clarify, i really only need help calculating the Avg. Total for last 6 weeks

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel1

Power BI Monthly Update - May 2024

Check out the May 2024 Power BI update to learn about new features.

Top Kudoed Authors