Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
5 years ago

Calculating Utilization as a Measure

Hi, 

 

I am struggling to get the correct output when calculating our Utilizations. Before applying a date filter, it seems to work (or at least make sense). 

 

My calculation is as follows (see picture attached): Measure = COUNT(Nr. of Reservations) / SUM (Nr of. Rooms). 

When doing this, as soon as I apply a date filter, the output is completely wrong. For instance when looking at "Yesterday", I can see that we had 6 Reservations and 7 available rooms that day, so 6 divided by 7 should be an 85% Utilization, however when doing this in Power BI (with calculations, filters), my answer is 1.81%...

 

Can anyone help me with this? What am I missing here?

 

Utilization Measure = COUNT(nr. of reservations) / SUM(nr. of rooms available)

3 Replies

  • Anonymous , You measure should work

    Utilization Measure = Divide(COUNT(Table[reservations]) / SUM(Table[nr. of rooms available]))

     

    can you share exact calculation

    Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.

    • Anonymous's avatar
      Anonymous
      Not applicable

      Hi and thank you for your answer, 

       

      I am not able to share sample data as this would be highly sensitive data as well. 

       

      My measure, as you stated, should be correct: 

       

      Divide(Count(Table[reservations]), SUM(Table[nr. of rooms available]).

       

      If I do just this and apply it to a card, it looks correct. As soon as I applu filters on it, such at "when, which hotel, which customer group" etc. it becomes wrong.

  • v-yalanwu-msft's avatar
    v-yalanwu-msft
    Community Support

    Hi Anonymous  , 

     

    According to your description, I tried to filter date or hotel, which is correct in my sample data,

    If your problem has not been solved, could you please provide me with more information? For example, what fields the table has or Provide a similar simple example of data.

     

    Here are the results of my simple data:

     

     

    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.