Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
RalphO
Helper I
Helper I

Filtering out abnormal differences between values

Hey everyone,

 

I need to find the minimum value of State of Charge for each day. However, there are some incorrect values in the set in which the state of charge drops to 0 for a second and then returns to normal. This of course changes the daily minimum value to 0. So my question is, how can I remove these incorrect values using a measure?

 

Note that it is possible for the value to reach zero, just not with that big of a difference in one second of time. 

 

Laagste SOC incorrect 0 filter.PNG

1 ACCEPTED SOLUTION
v-yulgu-msft
Employee
Employee

Hi @RalphO,

 

You can try a Measure instead.

abnormal drop =
VAR Timediff =
    SELECTEDVALUE ( Table2[Time] )
        - CALCULATE (
            MAX ( Table2[Time] ),
            FILTER ( ALL ( Table2 ), Table2[Time] < SELECTEDVALUE ( Table2[Time] ) )
        )
VAR previousState =
    CALCULATE (
        SUM ( Table2[State of Charge] ),
        FILTER (
            ALL ( Table2 ),
            Table2[Time]
                = SELECTEDVALUE ( Table2[Time] ) - timediff
        )
    )
RETURN
    IF ( previousState - SELECTEDVALUE ( Table2[State of Charge] ) < 25, "Y", "N" )

1.PNG

 

Best regards,

Yuliana Gu

Community Support Team _ Yuliana Gu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

13 REPLIES 13

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.