Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
5 years ago
Solved

Retrieve only one rows with two status

Hi All, Below is my data. Date JobName Step Number Step Name Status 6/16/2021 CRM data Step1 Load Staging Data Success 6/16/2021 CRM data Step2 Load WareHouseData Success...
  • Fowmy's avatar
    5 years ago

    Anonymous 

    Create the following measure and add this measure and the Job Name in a table or matrix visuals:

    Final Status = 
    var __t = CALCULATETABLE( Table1 , ALLEXCEPT( Table1 , Table1[JobName] )) return
    SWITCH(
        TRUE(),
        CONTAINS(__t,Table1[Status],"Fail") , "Fail",
        CONTAINS(__t,Table1[Status],"Running") , "Running",
        "Sucess"
    )