Skip to main content
cancel
Showing results for 
Search instead 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

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]))

 

 

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
Fabric Community Conference

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.

February 2024 Update Carousel

Power BI Monthly Update - February 2024

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

Fabric Career Hub

Microsoft Fabric Career Hub

Explore career paths and learn resources in Fabric.

Fabric Partner Community

Microsoft Fabric Partner Community

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