Forum Discussion

Juuls's avatar
Juuls
Frequent Visitor
5 years ago
Solved

Conditional format varchar

Hi all,   I am trying to apply condtional formatting to my table, which consists of varchar data. I cannot modify the data, since I am using DirectQuery. In order to get it working, I have tried to...
  • MFelix's avatar
    MFelix
    5 years ago

    Hello @Juuls ,

    This is related to the locale, replace all ";" (semicolon) by "," (comma) everything should work fine.

    Check the corrected measurement below:

    CondittionalFormatting = 
    VAR Temp_table =
        ADDCOLUMNS (
            SUMMARIZE (
                Run_Status,
                Run_Status[Source],
                Run_Status[Run_Status]
            ),
            "@Status_Values", LOOKUPVALUE ( Lookup[Value], Lookup[Run_Status], Run_Status[Run_Status] )
        )
    RETURN
        SWITCH ( MAXX ( Temp_table, [@Status_Values] ), 1 , "Green" , 2 , "Red" , 3 , "Blue" )