Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
2 years ago
Solved

Matrix Formatting Ideas

Hi All,

 

Kindly let me know how can I highlight specific rows background and make the values in Bold in a matrix visual.

 

Column 1, Column 2 and Column 3 are separate measures

Results - Just a column in a table

 

 

Thanks

 

  • Hi,
    I think you can achieve something very similar to what you are looking for,
    like this

    first, you need to create 2 measures for that:
    1) back color - for the background rows you want to highlight 

    2) font color - for highlighting the text with the dark background 

    see examples


    back_color =
    VAR selctedVal = SELECTEDVALUE('Dim Date'[MonthYearInt])
    RETURN
    IF(selctedVal IN {202203,202205,202212}, "GRAY","WHITE")

     

    font_color =
    VAR selctedVal = SELECTEDVALUE('Dim Date'[MonthYearInt])
    RETURN
    IF(selctedVal IN {202203,202205,202212}, "WHITE","BLACK")

     

    second,
    you need to define for each column (measure) the condition on "Cell elements"

     

    good luck

4 Replies

  • Hi,
    I think you can achieve something very similar to what you are looking for,
    like this

    first, you need to create 2 measures for that:
    1) back color - for the background rows you want to highlight 

    2) font color - for highlighting the text with the dark background 

    see examples


    back_color =
    VAR selctedVal = SELECTEDVALUE('Dim Date'[MonthYearInt])
    RETURN
    IF(selctedVal IN {202203,202205,202212}, "GRAY","WHITE")

     

    font_color =
    VAR selctedVal = SELECTEDVALUE('Dim Date'[MonthYearInt])
    RETURN
    IF(selctedVal IN {202203,202205,202212}, "WHITE","BLACK")

     

    second,
    you need to define for each column (measure) the condition on "Cell elements"

     

    good luck

    • Anonymous's avatar
      Anonymous
      Not applicable

      Hi,

       

      Thank you for sharing the idea. Sure! Let me try this.

       

      How can I highlight the same row headers also? ( Gross Profit, EBITDA and EBITDA Margin)