Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago
Solved

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
  • (Anonymous ,

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

    Make sure both these columns are of numeric field.

     

  • 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


3 Replies

  • (Anonymous ,

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

    Make sure both these columns are of numeric field.

     

  • Anonymous , Try a new measure

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

     

     

  • Mariusz's avatar
    Mariusz
    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