Forum Discussion

Spurgeon74's avatar
Spurgeon74
Frequent Visitor
5 months ago
Solved

Linear

Hello!

I have a single measurement signal that sends readings at irregular intervals. How can I prevent Power BI from interpolating the data in the visual and connecting two points over extended periods, as shown in the attachment? Additional question: How do I display multiple irregular signals in an xy-chart without interpolation lines for missing values?
 
  • Hi,

    In Microsoft Power BI, a line chart always connects the available points unless you explicitly introduce blank values or segment the series.

     

    One option  would be to use categorical, instead of continuous x-axis type.

    Second option is to create a measure that breaks the line when the time gap is too large. The trick is returning BLANK() when the gap exceeds a threshold.

     

    Value_NoInterpolation =
    VAR CurrentTime = MAX(Data[Timestamp])
    VAR PrevTime =
    CALCULATE(
    MAX(Data[Timestamp]),
    FILTER(
    ALL(Data),
    Data[Timestamp] < CurrentTime
    )
    )

    VAR GapMinutes =
    DATEDIFF(PrevTime, CurrentTime, MINUTE)

    RETURN
    IF(
    GapMinutes > 60, -- threshold you choose
    BLANK(),
    MAX(Data[Value])
    )

     

3 Replies

  • Hi,

    In Microsoft Power BI, a line chart always connects the available points unless you explicitly introduce blank values or segment the series.

     

    One option  would be to use categorical, instead of continuous x-axis type.

    Second option is to create a measure that breaks the line when the time gap is too large. The trick is returning BLANK() when the gap exceeds a threshold.

     

    Value_NoInterpolation =
    VAR CurrentTime = MAX(Data[Timestamp])
    VAR PrevTime =
    CALCULATE(
    MAX(Data[Timestamp]),
    FILTER(
    ALL(Data),
    Data[Timestamp] < CurrentTime
    )
    )

    VAR GapMinutes =
    DATEDIFF(PrevTime, CurrentTime, MINUTE)

    RETURN
    IF(
    GapMinutes > 60, -- threshold you choose
    BLANK(),
    MAX(Data[Value])
    )

     

  • HI Spurgeon74,

    Checking in to see if your issue has been resolved. let us know if you still need any assistance.

     

    Thank you.