Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
Hello everyone!
I have a transactional table that shows me the sales for every article on a daily level:
| Date | Article | Key | Sale |
| 01.01.2021 | A | A1 | 50 |
| 02.01.2021 (Sat) | A | B | 50 |
| 03.01.2021 (Sun) | A | B | 70 |
| 04.01.2021 | A | A1 | 80 |
As you can see there were sales on the weekend (03. & 04. ). Every weekend sales has the key 'B'.
What I now want to determine is if there was a sale on each weekend in the previous 3 weekends - regardless if it was a Saturday and/or Sunday.
How would you do that with a DAX measure?
Hello @joshua1990 ,
You can try this.
Total Sales =
CALCULATE(
SUM( 'TABLE'[SALE] ),
KEY = "B"
)
You can put into visual and put a date filter on the visual level of relative date is in the last 21 days.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 8 | |
| 6 | |
| 5 | |
| 5 | |
| 4 |
| User | Count |
|---|---|
| 25 | |
| 16 | |
| 8 | |
| 8 | |
| 8 |