Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago
Solved

Column colors based on header, not on content

Dear all,   I am working with school data on sanitation and cleanliness and we are now starting to use PowerBi to analyze and present the data. We have a matrix in PwerBI based on a column with 5 v...
  • Mariusz's avatar
    6 years ago

    Hi Anonymous 

     

    You can create a measure like below and later use it for conditional formatting in your Matrix Visual.

    conditional formating = 
    VAR _sv = SELECTEDVALUE( 'Table'[Category] )
    RETURN 
    SWITCH(
        TRUE(),
        _sv = "NP", 1,
        _sv = "no star", 2,
        _sv = "1 star", 3
    )

    This is how you set up Conditional Formating on Value fields in your Matrix.

     
    Please see the attached file for reference.
    Hope this helps!
     
    Best Regards,
    Mariusz

    If this post helps, then please consider Accepting it as the solution.

    Please feel free to connect with me.
    Mariusz Repczynski