Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
For my analysis, I require information on the number of days when the store did not record any sales or when its operations were closed.
Thanks for the reply. Actually, I have a fact table containing day-wise, store-wise sales information. On a particular day, some stores might have sales information, while others might not sell anything.
Date | Store ID | Sales |
1/1/2023 | 1 | 100000 |
1/1/2023 | 2 | 20000 |
1/1/2023 | 3 | 400000 |
But I have 4 stores, and I want a output like below:
Store ID | No of Days without Sales |
1 | 0 |
2 | 0 |
3 | 0 |
4 | 1 |
Hi @Yunus_Miah
For your question, here is the method I provided:
Here's some dummy data
"Table"
Create a measure, calculate the number of days that the store didn't record any sales or close operations
Days With No Sales =
CALCULATE(
COUNTROWS('Table'),
NOT(
'Table'[sales] > 0
),
FILTER(
ALL('Table'),
'Table'[store] = MAX('Table'[store])
)
)
Here is the result
If you're still having problems, provide some dummy data and the desired outcome. It is best presented in the form of a table.
Regards,
Nono Chen
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
User | Count |
---|---|
57 | |
22 | |
18 | |
16 | |
11 |
User | Count |
---|---|
85 | |
54 | |
39 | |
21 | |
18 |