Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.
Hello Power BI expert heroes!
I'm trying to calcuate weekly consumer sales average over 4 weeks based on the table format below (My table have month and week only, but not date)
Could you please let me know how I can get the results?
Calendar Month | Calendar Week | Consumer Sales |
Jan | 1 | 50 |
Jan | 2 | 60 |
Jan | 3 | 80 |
Jan | 4 | 50 |
Feb | 5 | 70 |
Feb | 6 | 50 |
Feb | 7 | 48 |
Feb | 8 | 30 |
Mar | 9 | 40 |
Mar | 10 | 46 |
Mar | 11 | 90 |
Mar | 12 | 72 |
Mar | 13 | 76 |
Solved! Go to Solution.
@Junminkim0214 based on your data, the solution is attached, tweak it as per your need. I created few measures to showcase how it works but you can collapse all these in one (if you want)
I would ❤ Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos whoever helped to solve your problem. It is a token of appreciation!
⚡Visit us at https://perytus.com, your one-stop shop for Power BI related projects/training/consultancy.⚡
Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!
Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo
If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤
Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.
@Junminkim0214 year? What happens if there are two years of data, month and week will repeat? How you will find out which year it is and go back 4 weeks?
Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!
Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo
If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤
Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.
Hi @parry2k ,
First, SUPER Thanks for your help! I pasted the same measures to my woring file, and it works now. 👍👍
Regardng year, yes you're right. How do we need to calculate 'Ave Last 4 Weeks' especially for 2020 early Jan which required LY 2019 Dec Weeks?
Calendar Year | Calendar Month | Calendar Week | Consumer Sales |
2019 | Dec | 48 | 80 |
2019 | Dec | 49 | 50 |
2019 | Dec | 50 | 70 |
2019 | Dec | 51 | 50 |
2019 | Dec | 52 | 48 |
2020 | Jan | 1 | 50 |
2020 | Jan | 2 | 60 |
2020 | Jan | 3 | 80 |
2020 | Jan | 4 | 50 |
2020 | Feb | 5 | 70 |
2020 | Feb | 6 | 50 |
2020 | Feb | 7 | 48 |
2020 | Feb | 8 | 30 |
2020 | Mar | 9 | 40 |
2020 | Mar | 10 | 46 |
2020 | Mar | 11 | 90 |
2020 | Mar | 12 | 72 |
2020 | Mar | 13 | 76 |
@Junminkim0214 , I am hopeful, you have already got solution from @parry2k post. My approch is using Rank. In that you need a numeric month.
Year-Month-Week
2019-01-01
You can refer
As I have nor seen Parry's Solution, my be repeated what he has suggested.
@Junminkim0214 based on your data, the solution is attached, tweak it as per your need. I created few measures to showcase how it works but you can collapse all these in one (if you want)
I would ❤ Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos whoever helped to solve your problem. It is a token of appreciation!
⚡Visit us at https://perytus.com, your one-stop shop for Power BI related projects/training/consultancy.⚡
Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!
Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo
If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤
Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.
Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!
Check out the October 2025 Power BI update to learn about new features.