Forum Discussion

nish2288's avatar
nish2288
Helper I
8 years ago
Solved

Color top 5 rows in a table

Hi All,

 

I have created table with 20 rows.

I wanted to color first 5 rows only.

Any idea?

  • nish2288's avatar
    nish2288
    8 years ago

    I was able to find the solution for this.

     

    Solution:

    Step 1:  Create measure(M1)and use RANKX function to rank values in table based on column you want.

    Step 2 : Create another measure M2 =IF(M1<=5,1,0)

    Step 3 : Now in a table values,use conditional formatting based on M2

     

3 Replies

  • Greg_Deckler's avatar
    Greg_Deckler
    Community Champion

    With the May version you can base the color coding on a measure or other column. So, perhaps a RANKX measure but I would need to understand your data and how you are presenting it to be more specific.

  • v-piga-msft's avatar
    v-piga-msft
    Resident Rockstar

    Hi nish2288,

     

    Have you solved your problem by the solution provided by Greg_Deckler?

     

    If you have solved, only thing that you'll have to notice, just always accept the replies making sense as solution to your question so that people who may have the same question can get the solution directly.

     

    If you still need help, please describe your scenario in more details and share your expected output, so that we can help further investigate on it?

     

    Best Regards,

    Cherry

    • nish2288's avatar
      nish2288
      Helper I

      I was able to find the solution for this.

       

      Solution:

      Step 1:  Create measure(M1)and use RANKX function to rank values in table based on column you want.

      Step 2 : Create another measure M2 =IF(M1<=5,1,0)

      Step 3 : Now in a table values,use conditional formatting based on M2