Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
2 years ago
Solved

Power BI Matrix Per Hour Overview

I have 2 matrices I need to create: 1. Matrix showing Utilization % per Ride per weekday 2. Matrix showing Total Utilization % per hour per weeekday The ride data is in the Ridership Events table ...
  • Anonymous's avatar
    Anonymous
    2 years ago

    Hi Anonymous ,

    I think you can use the VAR function to write the variables one by one, here is the DAX code you can try.

    Total Utilization % =
    VAR TotalRidersPerHour =
        SUM ( 'RidershipEvents'[CumulativeRiders] )
    VAR TotalCapacityPerHour =
        SUM ( 'Ride'[Capacity] )
    RETURN
        DIVIDE ( TotalRidersPerHour, TotalCapacityPerHour, 0 )

    If this code doesn't work you can provide me more information or your .pbix file.

     

     

     

    Best Regards

    Yilong Zhou

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

  • Anonymous's avatar
    Anonymous
    2 years ago

    Hi Anonymous ,

    I think I'm missing your point probably because I don't have a complete view of the data in your table. If you can provide me with specific data from the table, I will look into your question further.

     

     

    Best Regards

    Yilong Zhou

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.