Forum Discussion

asimpleman9to5's avatar
asimpleman9to5
Frequent Visitor
4 years ago
Solved

Filtering data before calculation

Hi all. From the screenshot shown above, I would like to filter the serial number first before proceeding to calculate the difference in the higest and lowest voltage within each serial number...
  • Jihwan_Kim's avatar
    4 years ago

    Hi,

    I assume you want to create a calculated column.

    Please check the below picture and the attached pbix file.

     

     

    Diff calculated column =
    MAXX (
        FILTER ( Data, Data[Serial No] = EARLIER ( Data[Serial No] ) ),
        Data[Voltage]
    )
        - MINX (
            FILTER ( Data, Data[Serial No] = EARLIER ( Data[Serial No] ) ),
            Data[Voltage]
        )