Forum Discussion

nirrobi's avatar
nirrobi
Icon for Helper V rankHelper V
8 years ago
Solved

Calculate Transit time between port destination

Hi all,   I have table with the following data:   Index - running number - no special purpose LineDirection - the line route name Port - one of the route direction TransitTime - the time take ...
  • nirrobi's avatar
    nirrobi
    8 years ago

    Thanks for your recommendation,

     

    I was able to solved the problem using the following DAX formula:

     

    Cumulative TT=
    CALCULATE(
        SUM( Table1[CummulativeTT] ) ,
        FILTER(
            ALL( Table1 ) ,
            Table1[Index] <= MAX( Table1[Index] )
            && Table1[LineDirection] = MAX( Table1[LineDirection] )
        )
    )

     

    The *MAGIC* for me wat the last line - where I can compare TEXT with the MAX function.