Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.

Reply
Yunus_Miah
Frequent Visitor

DAX formula for determining the number of days during which a store has recorded no sales.

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.

2 REPLIES 2
Yunus_Miah
Frequent Visitor

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.


DateStore IDSales
1/1/2023    1100000
1/1/2023    220000

1/1/2023

    3400000

 

But I have 4 stores, and I want a output like below:

 

Store IDNo of Days without Sales
1                                      0
2                                      0
3

0

4

1

 

Anonymous
Not applicable

Hi @Yunus_Miah

 

For your question, here is the method I provided:

 

Here's some dummy data

 

"Table"

vnuocmsft_0-1704854891268.png

 

Create a measure, calculate the number of days that the store didn't record any sales or close operations

vnuocmsft_1-1704855278306.png

 

Days With No Sales = 
    CALCULATE(
        COUNTROWS('Table'),
        NOT(
            'Table'[sales] > 0
            ),
        FILTER(
            ALL('Table'),
            'Table'[store] = MAX('Table'[store])
        )
    )

 

 

Here is the result

vnuocmsft_2-1704855334792.png

 

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.

 

 

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 2025 Power BI update to learn about new features.