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:

 

 What i need:

 What measure i need to write to get red grapfic? Table of time already have.

 

 

 

  • 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 )
        )

     

7 Replies

    • Bessonnizza1992's avatar
      Bessonnizza1992
      Helper I

      Ty for reply, but this option don't help me.

       

      For example i have two points 

      Value 1 - Timestamp 00:00:00

      Value 0 - Timestamp 00:21:37

       

      So mesuare must calculate all points beetween this. 

      Value 1 - Timestamp 00:00:01

      Value 1 - Timestamp 00:00:02

      Value 1 - Timestamp 00:00:03

      Value 1 - Timestamp 00:00:04

      and so on.

      • Anonymous's avatar
        Anonymous
        Not applicable

        Hi Bessonnizza1992 ,

        What's your desired result? According to your example data, whether the table is what you want:

        Best Regards

        Rena