Forum Discussion

Sarumahay's avatar
Sarumahay
New Member
2 years ago
Solved

Calculation for Overall State

Hi All,   Pretty new in Power BI. I would like to display overall state for the following below. I have the table below.   Assets ID Components Condition Code Severity Level UC0...
  • Jihwan_Kim's avatar
    2 years ago

    Hi,

    I am not sure how your semantic model looks like, but I tried to create a sample pbix file like below.

    Please check the below picture and the attached file.

    It is for creating a measure.

     

     

    INDEX function (DAX) - DAX | Microsoft Learn

     

     

    Overall state measure: =
    VAR _maxlevel =
        INDEX (
            1,
            ALL ( Data[Condition Code], Data[Severity Level], Data[Assets ID] ),
            ORDERBY ( Data[Severity Level], DESC ),
            ,
            PARTITIONBY ( Data[Assets ID] )
        )
    RETURN
        CALCULATE ( SELECTEDVALUE ( Data[Condition Code] ), _maxlevel )