Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
7 years ago
Solved

Conditional Formatting using slicer values

Hi All,

 

Let's say I have the following data in a table visual:

 

Month Reported

January

January

December

November

November

November

October

 

And I have a slicer: Reporting Month and the user selected "January". How do I format my table to highlight the rows that is equal to what is selected in the slicer? e.g. January.

 

Thanks

  • Hi Anonymous ,

    Based on my test, you could refer to below steps:

    Sample data:

    Create a new table:

    New = VALUES(Table1[Month Reported])

    Use this column as slicer.

    Create a new measure:

    Measure = IF(MAX('Table1'[Month Reported])=SELECTEDVALUE(New[Month Reported]),"#FD625E")

    Set conditional formatting:

    Now you could get the result:

    You could also download the pbix file to have a view.

     

    Regards,

    Daniel He

     

3 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi Kim_Chan,

     

    Good Idea. But this is not possible in Power BI when you select value in slicer and it should highlight it in the table visual.

     

    You can post this in Power BI Ideas and Microsoft will consider this and Implement this feature in the later version of Power BI.

     

    Regards,

    Pradeep

  • v-danhe-msft's avatar
    v-danhe-msft
    Microsoft Employee

    Hi Anonymous ,

    Based on my test, you could refer to below steps:

    Sample data:

    Create a new table:

    New = VALUES(Table1[Month Reported])

    Use this column as slicer.

    Create a new measure:

    Measure = IF(MAX('Table1'[Month Reported])=SELECTEDVALUE(New[Month Reported]),"#FD625E")

    Set conditional formatting:

    Now you could get the result:

    You could also download the pbix file to have a view.

     

    Regards,

    Daniel He

     

    • Anonymous's avatar
      Anonymous
      Not applicable

      Hi v-danhe-msft,

       

      Thank you so much for your reply. I've resolved this before your reply but I used a similar approach as yours.

       

      Appreciate it!