Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
Hi,
Need an help with below query
I want to calculate last 3 days sales of a product in a particular store, so if there is a sale in last 3 days then it will display result as 1 but if there is no sale in last 3 days then result should be 0.
STORE
---------
date | product_id | store_id | cnt_txns |
08/04/24 | 4051 | 491 | 1 |
09/04/24 | 40880 | 491 | 1 |
10/04/24 | 40880 | 491 | 1 |
11/04/24 | 40880 | 491 | 1 |
OUTPUT
---------
date | product_id | store_id | last 3 days txns |
12/04/24 | 4051 | 491 | 0 (no sale on 9th,10,11) |
12/04/24 | 40880 | 491 | 1 (there was a sale in past 3 days) |
can someone please help me with the dax here?
Solved! Go to Solution.
pls try this
Proud to be a Super User!
pls try this
Proud to be a Super User!
User | Count |
---|---|
93 | |
83 | |
77 | |
71 | |
65 |
User | Count |
---|---|
114 | |
101 | |
96 | |
65 | |
60 |