Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Change background colour of a pivot table based on values in first row

Hi everyone

This is my first question this forum. I have a table which contains some student and unit data based on their teaching period.

The table depicted as follows,

Student and Unit  |   Teaching Period 1     |     Teaching Period 2     |     Teaching Period 3

Unit 320                 |    60.1                            |      58.1                            |      60.5

David                     |    55.3                            |       65.3                           |      53.1

Asker                     |    80.3                            |      56.6                            |      63.7

Piter                      |    75.3                            |      63.5                            |      49.2

I would like to colour code the student marks based on the unit average mark which is stated in the first row of the table.


PS- There can be many teaching periods that means columns are dynamic depending on user selection from filters.


Expected output:


Student and Unit  |   Teaching Period 1     |     Teaching Period 2     |     Teaching Period 3

Unit 320                 |    60.1                            |      58.1                            |      60.5

David                     |    55.3                            |      65.3                            |      53.1

Asker                     |    80.3                            |      56.6                            |      63.7

Piter                       |    75.3                            |      63.5                            |      49.2



Any help or advice is very appreciated.


Thanks.            

6 Replies
vishsaggi
Champion III
Champion III

can you shares some sample data and expressions you used for these teaching period1, 2, and 3? Is this how you data going to be?

vvira1316
Specialist II
Specialist II

Anil_Babu_Samineni

You want to effect this in row level?

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
Anonymous
Not applicable
Author

Hi Anil

Yes, that is right. I need to colour the background of the cell in each column based on the unit average mark and teaching period.

vinod22kv
Creator
Creator

Hi,

You can find the your answer in  chart properties : visual cues.

Regards,

Vinod.

vishalarote
Partner - Creator II
Partner - Creator II

Hi Sahan,

In Expression add -> text color by condition

Expression 1: if([ Teaching Period 1 ]>=55 and [ Teaching Period 1 ]<60,rgb(255,0,0),

                       if([ Teaching Period 1 ]>61,rgb(0,255,0)))

Expression 2: if([ Teaching Period 2 ]>=55 and [ Teaching Period 2 ]<58,rgb(255,0,0),

                       if([ Teaching Period 2 ]>59,rgb(0,255,0)))

Expression 3: if([ Teaching Period 3 ]>=49 and [ Teaching Period 3 ]<54,rgb(255,0,0),

                       if([ Teaching Period 3 ]>61,rgb(0,255,0)))