Forum Discussion
XenDance
2 years agoRegular Visitor
Calculating desk usage figures
Good afternoon everyone, I'm trying to create some visualisations in Power BI for data I've been provided from a desk booking application. The application generates the following example data: ...
- Anonymous2 years ago
Hi XenDance ,
Okay, I've modified the conditions.
Maximum Weekdays = VAR __today = TODAY() VAR __cur_active_from_date = SELECTEDVALUE('Desks'[Active From]) VAR __active_from_date = IF(ISBLANK(__cur_active_from_date), MAX('Bookings'[Date]) , __cur_active_from_date) VAR __result = IF(ISBLANK(__active_from_date) || __today<__cur_active_from_date, 0, NETWORKDAYS(__active_from_date,__today,1)) RETURN __resultWeekdays Booked = CALCULATE(COUNTROWS('Bookings'),FILTER('Bookings', NOT WEEKDAY('Bookings'[Date],2) IN {6,7} && 'Bookings'[Date]<=TODAY())) + 0Best Regards,
Gao
Community Support TeamIf there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!How to get your questions answered quickly -- How to provide sample data in the Power BI Forum
XenDance
2 years agoRegular Visitor
Hi Anonymous,
This is perfect, thanks for providing this solution so quickly 😀