Forum Discussion
kerre
5 years agoNew Member
Monitoring Flex desk availability based on dynamic start/endDate
Hi , I'm at very beginning of designing a "flex desk reservation" application by means of Power BI, Power Automate and Power App. Before getting to automating leg of the project, I'd like to solv...
amitchandak
Super User
5 years agokerre , Try to use an indpendent dat table as slicer and then try meausre like
measure =
VAR _max = MAXX(allselected("Date"),"Date" [Date])
var _min = MinX(allselected("Date"),"Date" [Date])
return
IF (Min ( Reservations[StartDate] ) <= _min
&& MAX ( Reservations[EndDate] ) >= _max,1,0)
kerre
5 years agoNew Member
Thanks amitchandak for your reply.
I actually have 2 independent Date tables named Start Date and End Date of which selected values are hold in 2 measures:
Selected Value Start Date = 'Start Date'[Date]
Selected Value Start Date = 'End Date'[Date]
I have implemented your formula as follows but that returns now no 1's ("ocuppied") at all. e.g. I choose whole month September in which there should deffinitely be 6 occupied desks.
(F)Filter Occupied Desks =
var _max = MAXX(allselected('Start Date'),'Start Date')
var _min = MINX(allselected('End Date'), 'End Date'[Date])
return
IF (MIN(Reservations[StartDate]) <= _min && MAX(Reservations[EndDate]) >= _max, 1 ,0)
Did I implemented your formula wrong then?
Thanks in advance,
Kerre