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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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