March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
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!
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
125 | |
85 | |
69 | |
54 | |
45 |
User | Count |
---|---|
204 | |
106 | |
98 | |
65 | |
54 |