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!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Could someone please explain how to write a DAX measure for the total sales of the same DAY last year?
I've seen the other posts, but none of them worked for me.
I am looking for the sales on the same day of the week, not the date.
----
(not working DAX)
----
Here is my file
https://drive.google.com/file/d/1Ppu2BR1ZZ_vpxM3jCKnmHgUzGuTI0XTJ/view?usp=sharing
Solved! Go to Solution.
Ah - here ya go:
Proud to be a Super User! | |
Hi! You can make the folowing measures:
Total Sales = SUM ('YouTable'[YourSalesField]
Total Sales LY = CALCULATE ([Total Sales], SAMEPERIODLASTYEAR ('DateTable'[Date])
Then, in your table, put in the date field from your date table and both of your measures. Have a date filter and filter to today (or whatever day you want) and the Total Sales measure will display this year amount and Total Sales LY will be the same date in the previous year.
I updated your file 🙂 https://drive.google.com/file/d/1Ppu2BR1ZZ_vpxM3jCKnmHgUzGuTI0XTJ/view?usp=drive_link
Proud to be a Super User! | |
Thank you, but I am looking for the same day, not the same date last year. Any help is appreciated greatly. I'm still new to DAX, so I don't fully understand the FILTER function.
I have a calculated column that finds the same day last year.
---
But this DAX code is not working:
---
Ah - here ya go:
Proud to be a Super User! | |
It's working in the test file, but I can't get it to work in my main file. Any idea why it's the same number?
Hi! Looks like you have this:
Proud to be a Super User! | |
Got it, thanks so much!
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
Check out the November 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 59 | |
| 43 | |
| 42 | |
| 23 | |
| 17 |
| User | Count |
|---|---|
| 190 | |
| 122 | |
| 96 | |
| 66 | |
| 47 |