cancel
Showing results for
Did you mean:

The ultimate Microsoft Fabric, Power BI, Azure AI & SQL learning event! Join us in Las Vegas from March 26-28, 2024. Use code MSCUST for a \$100 discount. Register Now

Helper I

## Occupacy rate DAX Function

Hi all,

please see bellow a sample of my db.

I'm trying to find a measure to calculate de occupation rate per vessel and voyage. It would be = On board / vessel capacity.

Can you help me with a dax function to do so?

 Categoria Vessel Origem Next Port Destino Voy VoyVesYr Date Week Week days ETA ATA ETD ATD On Board Vessel Capacity Value PAX V1 SV SA SA 101 101San20 19/02/2020 8 17/02/2020 - 23/02/2020 20:30:00 21:20:00 11:00:00 11:15:00 72 427 72 PAX V1 SV SA SA 103 103San20 19/02/2020 8 17/02/2020 - 23/02/2020 14:00:00 13:30:00 15:00:00 15:08:00 171 427 131 PAX V1 SV SA SN 103 105San20 19/02/2020 8 17/02/2020 - 23/02/2020 14:00:00 13:30:00 15:00:00 15:08:00 171 427 40 PAX V1 SV SA SA 105 107San20 20/02/2020 8 17/02/2020 - 23/02/2020 18:00:00 17:40:00 07:00:00 07:10:00 177 427 177 PAX V1 SV SA SA 107 109San20 20/02/2020 8 17/02/2020 - 23/02/2020 10:00:00 09:35:00 11:00:00 11:50:00 147 427 147 PAX V1 SV SA SA 109 111San20 20/02/2020 8 17/02/2020 - 23/02/2020 14:00:00 13:50:00 15:00:00 15:15:00 106 427 106 PAX V1 SV SA SA 111 117San20 21/02/2020 9 17/02/2020 - 23/02/2020 18:00:00 17:35:00 07:00:00 08:05:00 159 427 159 PAX V1 SV SA SA 117 6Pra20 26/02/2020 1 24/02/2020 - 01/03/2020 19:00:00 20:23:00 16:00:00 16:05:00 357 208 357
2 ACCEPTED SOLUTIONS
Super User

Occupancy Rate = Sum(Table[Onboard])/Sum(Table[VesselCapacity])

Make sure both these columns are of numeric field.

Don't forget to give thumbs up and accept this as a solution if it helped you!!!

Please take a quick glance at newly created dashboards : Restaurant Management Dashboard , HR Analytics Report , Hotel Management Report, Sales Analysis Report , Fortune 500 Companies Analysis , Revenue Tracking Dashboard
Community Champion

Hello @SofiaVaz

Try this Measurement.

``````Measure =
DIVIDE(
SUM( 'Table'[On Board] ),
SUM( 'Table'[Vessel Capacity] )
)``````

Best regards
Mariusz

If this post helps,then consider accepting it as the solution.

Please feel free to connect with me.

3 REPLIES 3
Community Champion

Hello @SofiaVaz

Try this Measurement.

``````Measure =
DIVIDE(
SUM( 'Table'[On Board] ),
SUM( 'Table'[Vessel Capacity] )
)``````

Best regards
Mariusz

If this post helps,then consider accepting it as the solution.

Please feel free to connect with me.

Super User

@SofiaVaz , Try a new measure

New measure = divide(Sum('Table'[Onboard]),Sum('Table'[VesselCapacity]))

Super User

Occupancy Rate = Sum(Table[Onboard])/Sum(Table[VesselCapacity])

Make sure both these columns are of numeric field.

Don't forget to give thumbs up and accept this as a solution if it helped you!!!

Please take a quick glance at newly created dashboards : Restaurant Management Dashboard , HR Analytics Report , Hotel Management Report, Sales Analysis Report , Fortune 500 Companies Analysis , Revenue Tracking Dashboard

Announcements

#### Microsoft Fabric Community Conference

Join us at our first-ever Microsoft Fabric Community Conference, March 26-28, 2024 in Las Vegas with 100+ sessions by community experts and Microsoft engineering.

#### Power BI Monthly Update - February 2024

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

#### Microsoft Fabric Career Hub

Explore career paths and learn resources in Fabric.

#### Microsoft Fabric Partner Community

Engage with the Fabric engineering team, hear of product updates, business opportunities, and resources in the Fabric Partner Community.

Top Solution Authors
Top Kudoed Authors