Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
2 years ago
Solved

Health Checking Applications

I have a CSV that has columns for Application, ServerName,Color.     Application  ServerName Color APPL1 ABCPMAPP01 GREEN APPL1 ABCPMAPP02 GREEN APPL1 ABCPMAPP03 AMBER APPL2 ...
  • Fowmy's avatar
    Fowmy
    2 years ago

    Anonymous 

    I created the following measure, add the Application and the folliwng measure:

    App Status = 
    //GREEN, YELLOW, AMBER, RED. 
    VAR __Colors = VALUES( Table08[Color] )
    VAR __Red = "RED" IN __Colors
    VAR __Amber = "AMBER" IN __Colors
    VAR __Yellow = "YELLOW" IN __Colors
    VAR __Green = "GREEN" IN __Colors
    
    VAR __Result = 
        SWITCH(
            TRUE(),
            __Red, "RED",
            NOT __Red &&  __Amber , "AMBER",
            NOT __Red && NOT __Amber && __Yellow , "Yellow",
            NOT __Red && NOT __Amber && NOT __Yellow , "Green"
        )
    RETURN
        IF( 
            ISINSCOPE( Table08[Application ] ),
            __Result
        )