Forum Discussion

Sven01's avatar
Sven01
Helper I
8 years ago

Simultaneous occupancy Airport

Hi,

i have a table with groupnr., event (arrival or departure) and eventtime. A pair of groupnummers always contains one row as arrival and anotherone as departure event (same groupnummer).

 

What i need to know is the one hour range with the most plans on ground and the groupnummer of them.

 

Would be also nice to get the average groundtime.

 

SAMPLE DATA: https://www.dropbox.com/s/mfd2f3hbadkt245/sample%20data.pbix?dl=0

 

Thanks a lot for your time,

Cheers

 

5 Replies

  • rolling occupancy  = 
    CALCULATE( COUNT(Tabelle1[groupnr.] );
                FILTER (ALLSELECTED(Tabelle1) ; Tabelle1[Arr/Dep] = "A" 
                    && Tabelle1[eventtime] <= MAX ( 'time shape'[end] ));
                FILTER (ALLSELECTED(Tabelle1) ; Tabelle1[Arr/Dep] = "D" 
                    && Tabelle1[eventtime] >= MAX ( 'time shape'[start])))

    I tryed somthing like that but unfortunately it wont work.

     

    Any suggestions for a smarter way?

     

     

    • Sven01's avatar
      Sven01
      Helper I

      Hi v-chuncz-msft,

       

      thank you for your reply. what do you mean with select pivot colum first? sry iam a newbie to PBI

       

      Thanks

      • Sven01's avatar
        Sven01
        Helper I

        Dear All,

         

        i need a measure to find all airplans which are on ground in a defined time window.

         

        time window: 'Belegung Shape' [start] > <  'Belegung Shape' [end]

         

        arriving event: [Anflug/Abflug] = "A"

        departure event: [Anflug/Abflug] = "D"

         

        time of event: [Bockzeit]

         

        [Satzgruppennr.] = defines an arrival & departure event connected with the same groupnumber, but in two differnt rows.

         

        My approach for now:

         

        rolling Belegung = 
        CALCULATE( DISTINCTCOUNt(Tabelle2[Satzgruppennr.] );
                    FILTER (ALLSELECTED(Tabelle2) ;
        AND( Tabelle2[Ankunft/Abflug] = "A" ; Tabelle2[Blockzeit] <= MAX ( 'Belegung Shape'[end] ))) ; FILTER (ALLSELECTED(Tabelle2) ;
        AND( Tabelle2[Ankunft/Abflug] = "D" ; Tabelle2[Blockzeit] >= MAX ( 'Belegung Shape'[start] )))
        )

         

        That measure wont give any result, plaease help.

         

        Thank you

         

    • Sven01's avatar
      Sven01
      Helper I

      Hi v-chuncz-msft,

       

      thank you for your reply. what do you mean with select pivot colum first? sry iam a newbie to PBI

       

      Thanks