2 Tables:
Dates
Sales
Data:
MTD August-2022
222 Store locations
I’m new to DAX and I cannot figure out how to count the number of days with zero sales from each stores. Please help
2 Tables:
Dates
Sales
Data:
MTD August-2022
222 Store locations
I’m new to DAX and I cannot figure out how to count the number of days with zero sales from each stores. Please help
Hi @dnacpil , hope you are having a great day. You could play around and try something like this:
Sales Amount =
SUM ( Sales[Sales] )
Count of Days for Stores with Zero Sales =
VAR StoresWithZeroSales =
FILTER (
VALUES ( Sales[Store] ),
NOT ISEMPTY ( FILTER ( ALL ( Dates[Date] ), [Sales Amount] = 0 ) )
)
RETURN
CALCULATE ( [Sales Amount], KEEPFILTERS ( StoresWithZeroSales) )
Hi @dnacpil, did the response provided by @ronald_balza help in solving your query? If not, how far did you get and what kind of help you need further? If yes, kindly mark as solution the answer that solved your query.
Thank you. I will try it
Sorry but it’s giving me total sales from all stores
Hi @dnacpil! We noticed that your inquiry was left unsolved for quite some time now.
Looks like your inquiry was out of the experts and users’ bounds.
We strive to answer ALL inquiries in the forum. However, if you are sure that you provided all pertinent context to your concerns and read how to use the forum more effectively and still find your question unanswered, you can check out tutorials to learn this yourself as your membership also comes with relevant resources that may help you with your Power BI education.
While our users and experts do as much as reasonable to help you with your inquiries, not all concerns can be attended to especially if there are some learnings to be done. Thank you!