Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Jazz_MT
Frequent Visitor

Calculating Utilisation Rate

Hi All,

 

I am trying to calculate a utilisation rate which has the following formulate:

Utilisation  = Days Rented/Available Days

image.png

 

 

 

What I am finding funny is that for each individual year, month and room no the Utilisaiton rate is correct as per the above screenshot but then for the Total it is Incorrect as it is not summing the Available Days Correctly. Can anyone help out here ? 

 

Thanks,

Jake

 

11 REPLIES 11
parry2k
Super User
Super User

@Jazz_MT cannot see the images, I assume these are measures you created. Do you have put any condition in the measure. Can you provide more details?



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

HI All, 

 

Attaching the Image 

 

image.png

 

The only measure I created for is Utilisation the others are pulling the data Directly from Tables. 

 

J

 

hi, @Jazz_MT

This looks like a measure totals problem. Very common. See the post about it here: https://community.powerbi.com/t5/DAX-Commands-and-Tips/Dealing-with-Measure-Totals/td-p/63376

Also, this Quick Measure, Measure Totals, The Final Word should get you what you need:
https://community.powerbi.com/t5/Quick-Measures-Gallery/Measure-Totals-The-Final-Word/m-p/547907

 

Best Regards,
Lin

 

 

Community Support Team _ Lin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not applicable

It looks like the "Available Days" column is aggregating incorrectly. I plugged some of the sample data into an excel workbook at the grain I see in this table:

 

Utilization Rate2.PNG

I then just used your model for Utilization: 

 

Utilization = SUM(Sheet1[Days Rented]) / SUM(Sheet1[Available Days])
 
When I put all of this in a table, it looks correct on my end:
 
Utilization Rate.PNG
 
You can see in the image you provided that your Available Days only sums to 365, which is why your % value is so large. Is your data structured differently than what I provided above? Fixing how that value is summed is going to be the trick here I think.

Hi,

 

Out data model is different as it Counts the Rental Agreements in the Rental Agreements Granular table and based on the Month of the Rental PowerBI is obtaining the Available Days from the Date_table by counting the number of days in that particular month. 

 

Utilisation is basically being worked out as follows COUNT(Rental_Agreement)/COUNT(Rental_Date) i.e. Days Rented/DaysAvailable.

 

What PowerBI is counting the total number of the rows instead of summing the available days.

 

Thanks,

Jake

 

Anonymous
Not applicable

I'm still thinking about how to make this work in the context of your data structure.

 

In the meantime, I have two questions/concerns about the screenshot you provided. In your table, you are slicing by both Year/Month as well as Room Number. First, is there ever a scenario where an individual room number could have more days rented than available days in month? I'm seeing some of your cases where there are 37 Days Rented against 31 Available Days - I'm wondering if this is a bad count. Maybe this represents total number of rentals, rather than unique days on which rentals occured.

 

Second, by including room number in your visual, you might be inflating your total number of "Days Rented." For example, if two room numbers were both rented all 31 days, in your aggregation that will look like 62 Days Rented/ 31 Available Days. I'm thinking part of the solution to this might be removing Room Number from the table, and simply providing the ability to filter on this field. 

 

Obviously, I might be misinterpreting your data and it might be a requirement to include that in the visual, so this might not work for you.

I believe I ran into the same issue using counts and it not aggregating correctly. Use your existing measure that works on a per row basis in a total function. See below:  

 

Utilization Rate = 
IF(
    HASONEVALUE('TABLE1'[Rental_Agreement]),
        [Existing Measure],
    SUMX(VALUES('TABLE1'[Rental_Agreement]),
        [Existing Measure]
    )
)

@Jazz_MT you have to use different aggregation at total level using hasonefilter etc.

 

if you can put sample data in an excel sheet I will put together something for you. Thanks



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

@parry2k have DM'ed you.

 

Thanks,

J

@Jazz_MT I replied you back 🙂



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

Anonymous
Not applicable

I'm having trouble viewing the image you tried to attach. Could you try including it again?

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.