Forum Discussion

jppv20's avatar
jppv20
Icon for Solution Sage rankSolution Sage
3 years ago
Solved

Count records in previous time interval - Direct query mode

Hi,   My table visual looks like this (Where "Count id" is a count of the records in that time interval and "Count id -5" should be a measure):     What I need is the count of ids for the ...
  • Alf94's avatar
    3 years ago

    Hi jppv20,

     

    Can you try the following?

     

    Count ID - 5 = 
        CALCULATE(
            [Count Id],
            OFFSET(
                -1,
                ,
                ORDERBY( Table[Interval], ASC )
            )
        )

     

    If I answered your question, please mark my post as a solution.

     

    Best,