Forum Discussion

s_chayaphon's avatar
s_chayaphon
New Member
3 years ago
Solved

count with over calculation

Hi,   I've data as below sample, and I want to count on how many App Delay, Failed and Ontime. As you can see one app have many batch if one batch failed then the app define as failed if there is ...
  • tamerj1's avatar
    3 years ago

    Hi s_chayaphon 

    Manually create FilterTable that contains the three App Status values:

    Otime
    Delay 
    Failed 


    then count measure would be

    Count =
    SUMX (
    CROSSJOIN ( VALUES ( FilterTable[App Status] ), VALUES ( 'Table'[App] ) ),
    INT (
    FilterTable[App Status]
    IN SELECTCOLUMNS (
    TOPN ( 1, CALCULATETABLE ( 'Table' ), 'Table'[Status Code] ),
    "@Status", 'Table'[Status]
    )
    )
    )