Forum Discussion
Set Store open/close status when selecting multiple Dates
I have store status set as open/close for each day using calculated measure to check if sales=0 "Close" or Sales >0 "Open".I checked it each day it is showing correctly. The problem am facing is that when i select week number from the calender Slicer the result is different , it shows open, What i am looking for is that if a stoe is closed for a day then the week status should show "Close". The same happen when i select multiple date which has "open" and "Close" status. The result is always "Open"
Eample:
Mon-open
Tue-open
Wed -open
Thu-Open
Fri-open
Sat-open
Sun-open
Weekly status is "Open"(Correct)
Mon-open
Tue-open
Wed -close
Thu-Open
Fri-close
Sat-close
Sun-open
Weekly status is "Open"(Wrong)-- I want the result to show "close"
9 Replies
- AnonymousNot applicable
How are we to solve this puzzle without knowing how you produce the statuses for different time periods? Any idea?
- samHilFrequent Visitor
HIi Anonymous ,
Sorry i didnt get your question. I am getting the store status using a measure which checks the sales for a day and when i select the day in calander slicer it shows correctly ,if store has no sales it shows as "Close" but when i check for multiple days it is not showing "Close" which is my requirement( if a store has zero sales in a any of the selected day the store status should be set to "close"). I hope i made it clare.
This is the measuere i useOpen/Close =Var __Status__Check = if([GS]=0 && [GS Prev]<>0,"Close","Open")Return__Status__Check- Mohammad_RefaeiSolution Specialist
I understand that you want to flag the week as closed if it it closed in any day.
Then you probably need to write a measure like:
Weekly Status = VAR DailyStaus = ADDCOLUMNS ( SUMMARIZE ( 'Calendar', 'Calendar'[Date] ), "Status", [Open/Close] ) RETURN IF ( CALCULATE ( COUNTROWS ( DailyStatus ), [Status] = 0 ) >= 1, "Close", "Open" )