Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
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 solve some problems with dummy data.
My problem is to monitor available flex desks within the date range one would like to make a new reservation. Some practical information: There are 5 Tables and model is as follows.
1) The Start/End Date tables are used for choosing the date range one reserves a flex table: it can be only one day (Start Date = end Date) or for multiple subsequent days ( Start Date < End Date )
2) Desks Table has attributes like DeskNo, Floor, Flex(Yess,No) etc.
3) Users Table has attributes such as First Name, Last Name, Full Name, Emp.ID etc.
4)Reservation Table (basically the fact table) has the log of reservations: DeskNo, Reserved by(User Full Name), Start Date, End Date
I have 2 measures that holds the Requested reservation Dates:
While I choose some other dates:
Start Date : 08/09/2021
End Date: 09/09/2021
There is only one record within this dates and this desk has also only one record in my fact table so I can see desk 153 in the filtered Occuppied Desks table visualisation:
I tried to change my filter measure so that if a desk is flagged as 1 ("occupied") in one record and flagged as 0 ("available") on an other, it'd be flagged always as 1 "occupied". My new measure bacame like:
@kerre , 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)
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:
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.
Did I implemented your formula wrong then?
Thanks in advance,
Kerre
Check out the July 2025 Power BI update to learn about new features.
User | Count |
---|---|
23 | |
8 | |
7 | |
6 | |
6 |
User | Count |
---|---|
28 | |
12 | |
10 | |
10 | |
6 |