The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
Hi Everyone,
I will try to make my query short.
So, we have this table on the server which has got the details of the rooms in each facilities and has a column called 'inactive' (boolean) to let us know if the room is active or not.
To know the occupancy rate, I am dividing the total occupied numbers by the total active rooms, and to calculate total active rooms I am using the below formula:
Hi, @apanta ;
If you are calculating the number of active rooms per day, naturally you need a date column, so can you share what your data model looks like? What columns? do you want the output to show?
Best Regards,
Community Support Team _ Yalan Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
I seems you can change your verbose measure to
Active rooms = COUNTROWS( FILTER( 'Table_name', NOT 'Table_name'[Inactive] ) )
From your description, it's inferred that 'Table_name' table is already filtered by date filter somewhere. Above all, DAX is not Excel worksheet formula; any discussion without date model is nothing but giberrish.
Thanks to the great efforts by MS engineers to simplify syntax of DAX! Most beginners are SUCCESSFULLY MISLED to think that they could easily master DAX; but it turns out that the intricacy of the most frequently used RANKX() is still way beyond their comprehension! |
DAX is simple, but NOT EASY! |
User | Count |
---|---|
28 | |
12 | |
8 | |
7 | |
5 |
User | Count |
---|---|
35 | |
14 | |
12 | |
9 | |
7 |