The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
Hello everyone!
I need to figure out if any sales have been proceed on the weekend for the last 3 completed weeks.
I have this fact sheet:
ID | Date | Value | Key |
001 | 03.03.2021 | 5 | AB |
001 | 04.03.2021 | 6 | AB |
001 | 05.03.2021 | 7 | AB |
001 | 06.03.2021 | 8 | AA |
001 | 07.03.2021 | 1 | AA |
002 | 05.03.2021 | 4 | AB |
002 | 06.03.2021 | 2 | AA |
002 | 07.03.2021 | 3 | AA |
The key 'AA' means sales on weekend.
Regardless of if the sale was on Saturday or Sunday or both, it always counts as 1.
If there are entries with key 'AA' for the previous 3 weekends for an ID, then I need a TRUE. If not, then a FALSE.
How would you do that?
I already have a calendar table that shows me the week offset:
Date | WeekOffset |
28.02.2021 | -1 |
01.03.2021 | 0 |
02.03.2021 | 0 |
03.03.2021 | 0 |
04.03.2021 | 0 |
05.03.2021 | 0 |
06.03.2021 | 0 |
07.03.2021 | 0 |
I need a measure/ approach based on Dax without any transformation in PQ.
User | Count |
---|---|
17 | |
8 | |
7 | |
6 | |
6 |
User | Count |
---|---|
26 | |
13 | |
12 | |
9 | |
8 |