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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
joshua1990
Post Prodigy
Post Prodigy

Count Weekend Sales

Hello everyone!

I have a transactional table that shows me the sales for every article on a daily level:

DateArticleKeySale
01.01.2021AA150
02.01.2021 (Sat)AB50
03.01.2021 (Sun)AB70
04.01.2021AA180

 

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?

1 REPLY 1
Anonymous
Not applicable

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.

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.