Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.
I need see the number of stores open on a given day. I have an opendate column, a closeddate column (the closeddate will be blank if the store is still open) and a store number. I also have a dim_date table with all dates. What is the best way to see on any given day how many stores are open? I'm assuming a DATESBETWEEN of somekind, but I can't figure it out.
-Thanks
Buddy
Solved! Go to Solution.
create a measure like
Measure =
VAR CurrentDate = MAX(CalendarTable[Date])
RETURN
CALCULATE(COUNTROWS('Stores Table'), FILTER('Stores Table', 'Stores Table'[Open Date] <= CurrentDate && ('Stores Table'[Close Date] >= CurrentDate || ISBLANK('Stores Table'[Close Date]) ) )
create a measure like
Measure =
VAR CurrentDate = MAX(CalendarTable[Date])
RETURN
CALCULATE(COUNTROWS('Stores Table'), FILTER('Stores Table', 'Stores Table'[Open Date] <= CurrentDate && ('Stores Table'[Close Date] >= CurrentDate || ISBLANK('Stores Table'[Close Date]) ) )