Forum Discussion

Bessonnizza1992's avatar
5 years ago
Solved

Time Intelegence

I have an array of data where Value can only be in two states 1 or 0. Each value has its own timestamp of the event change from 1 to 0, etc.   When i build line chart PowerBI return me this: ...
  • Bessonnizza1992's avatar
    Bessonnizza1992
    5 years ago

    Anonymous PBI freezes too with this measure:(

     

    I tried to use a different construction, now everything is fine. Ty for help!

     

    Measure =
    VAR currDate =
        MAX ( CalendarTime[Time] )
    VAR prev =
        CALCULATE (
            MAX ( Statistics[Timestamp] ),
            FILTER ( ALLSELECTED ( Statistics ), [Timestamp] <= currDate )
        )
    RETURN
        CALCULATE (
            MAX ( Statistics[Value] ),
            FILTER ( ALLSELECTED ( Statistics ), [Timestamp] = prev )
        )