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!Vote for your favorite vizzies from the Power BI Dataviz World Championship submissions. Vote now!
I currently have weekly sales data refresh. I am looking to compare Week 1 of the month vs. prior Week 1's of all the prior months before that visually. In Week 2 I am looking to see a Cumulative sales for week1+2 vs. all prior Week 2 cumulative's of all the prior months. This would be the same for week 3 and week 4 as the data refreshes.
Is there custom coding that can allow me to do this? looking at MTD sales vs. Prior MTD using time intelligence does not provide the same outcome I am looking for.
thanks,
Solved! Go to Solution.
Yeah, sort of. Keep in mind that this will be very wobbly at the beginning of the month. Let's say
July - starts on a Friday
August - starts on a Monday
September - starts on a Thursday
Let's assume you only have transactions Monday through Friday.
First 6 days:
July: 4 working days
Aug: 5 working days
Sept: 4 working days
I think you can see where this is going. It becomes less of a problem the older a month gets.
Hi @Dlahey ,
Based on your description, please try this measure.
Measure =
VAR _date = CALCULATE(MAX('FactSalesTable'[Date]),ALL('FactSalesTable'))
VAR _day = DAY(_date)
VAR _year = SELECTEDVALUE('Calendar'[Year])
VAR _month = SELECTEDVALUE('Calendar'[Month Number])
VAR _sales = CALCULATE(SUM('FactSalesTable'[Sales]),FILTER('Calendar','Calendar'[Date]>=DATE(_year,_month,1)&&'Calendar'[Date]<=DATE(_year,_month,_day)))
RETURN
_sales
The PBIX file is attached for reference.
Best Regards,
Gao
Community Support Team
If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!
How to get your questions answered quickly -- How to provide sample data
I am looking to compare Week 1 of the month vs. prior Week 1's of all the prior months
Weeks and months are incompatible.
How about days in month vs. same days in month vs. prior months?
ie. Sep = 6 days, vs. Aug = first 6 days, vs. Jul = first 6 days.....
Yeah, sort of. Keep in mind that this will be very wobbly at the beginning of the month. Let's say
July - starts on a Friday
August - starts on a Monday
September - starts on a Thursday
Let's assume you only have transactions Monday through Friday.
First 6 days:
July: 4 working days
Aug: 5 working days
Sept: 4 working days
I think you can see where this is going. It becomes less of a problem the older a month gets.
I am comfortable with this, we only have refreshed sales data on a weekly basis therefore the minimum days would always be 4 or 5 working days with holidays factored in. However, this still gives a good indication to our company. thanks
Vote for your favorite vizzies from the Power BI World Championship submissions!
If you love stickers, then you will definitely want to check out our Community Sticker Challenge!
Check out the January 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 55 | |
| 52 | |
| 41 | |
| 16 | |
| 16 |
| User | Count |
|---|---|
| 108 | |
| 106 | |
| 39 | |
| 33 | |
| 25 |