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.
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 |
---|---|
16 | |
8 | |
7 | |
6 | |
6 |
User | Count |
---|---|
26 | |
13 | |
12 | |
8 | |
8 |