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

Get certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now

Reply
SofiaVaz
Helper I
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?

 

Thanks in advance

 

 

 

CategoriaVesselOrigemNext PortDestinoVoyVoyVesYrDateWeekWeek daysETAATAETDATDOn BoardVessel CapacityValue
PAXV1SVSASA101101San2019/02/2020817/02/2020 - 23/02/202020:30:0021:20:0011:00:0011:15:007242772
PAXV1SVSASA103103San2019/02/2020817/02/2020 - 23/02/202014:00:0013:30:0015:00:0015:08:00171427131
PAXV1SVSASN103105San2019/02/2020817/02/2020 - 23/02/202014:00:0013:30:0015:00:0015:08:0017142740
PAXV1SVSASA105107San2020/02/2020817/02/2020 - 23/02/202018:00:0017:40:0007:00:0007:10:00177427177
PAXV1SVSASA107109San2020/02/2020817/02/2020 - 23/02/202010:00:0009:35:0011:00:0011:50:00147427147
PAXV1SVSASA109111San2020/02/2020817/02/2020 - 23/02/202014:00:0013:50:0015:00:0015:15:00106427106
PAXV1SVSASA111117San2021/02/2020917/02/2020 - 23/02/202018:00:0017:35:0007:00:0008:05:00159427159
PAXV1SVSASA1176Pra2026/02/2020124/02/2020 - 01/03/202019:00:0020:23:0016:00:0016:05:00357208357
2 ACCEPTED SOLUTIONS
Tahreem24
Super User
Super User

(@SofiaVaz ,

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

View solution in original post

Mariusz
Community Champion
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.
Linkedin


View solution in original post

3 REPLIES 3
Mariusz
Community Champion
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.
Linkedin


amitchandak
Super User
Super User

@SofiaVaz , Try a new measure

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

 

 

Join us as experts from around the world come together to shape the future of data and AI!
At the Microsoft Analytics Community Conference, global leaders and influential voices are stepping up to share their knowledge and help you master the latest in Microsoft Fabric, Copilot, and Purview.
️ November 12th-14th, 2024
 Online Event
Register Here
Tahreem24
Super User
Super User

(@SofiaVaz ,

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

Helpful resources

Announcements
November Carousel

Fabric Community Update - November 2024

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

Live Sessions with Fabric DB

Be one of the first to start using Fabric Databases

Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.

Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.

Nov PBI Update Carousel

Power BI Monthly Update - November 2024

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