Forum

Notifications
Clear all

Simple conditional formating in pivot table

6 Posts
2 Users
0 Reactions
110 Views
(@fravis)
Posts: 337
Reputable Member
Topic starter
 

I can't get it working….

Pivot table with values for each month.

I need per row the highest and/or lowest in the year.

See attached example and explanation.

Thanks very much!

Frans

 
Posted : 21/04/2020 12:03 pm
Anders Sehlstedt
(@sehlsan)
Posts: 968
Prominent Member
 

Hello Frans,

See attached file, I have added two new sheets, Sheet2 and data (2).

As you can see in sheet data (2) I have adjusted the data to be in a tabular format. This is the key to get the correct conditional formatting as you want.
The Pivot Table in Sheet2 should show what you are after.

If you want to keep using the data table format as you have, I am pretty sure you probably need to create a new conditional formatting rule per row.

Best regards,
Anders

 
Posted : 21/04/2020 2:38 pm
(@fravis)
Posts: 337
Reputable Member
Topic starter
 

Thanks very much Anders. I see and think I understand why this is working and the original table not. Problem is that for this small part of data columns your solution is perfect. However I have about 160 columns who are necessary in different pivot tables. So I can't break the structure of the data.

Remaining solution to create the conditional formatting rule per row isn't an option, I think, with about 220 rows to go. 

Or can you simply copy and paste the conditional formatting of a row to other rows? I can try that out, but I'm afraid that isn't possible?

Is there perhaps an option with something with power query for this case that anybody knows?

Thanks anyway Anders!

Frans

 
Posted : 22/04/2020 2:51 pm
Anders Sehlstedt
(@sehlsan)
Posts: 968
Prominent Member
 

Hello Frans,

I have played around a little and by using a helper column I could do one formatting rule that highlights the cells per row that has lowest value. But as you will see if you add subtotals, this is not dynamic and I do suggest that you either re-arrange the data to a tabular structure or find a VBA solution.

As the Pivot Table grows or shrinks, you need to adjust the helper column accordingly.

Br,
Anders

 
Posted : 22/04/2020 5:56 pm
(@fravis)
Posts: 337
Reputable Member
Topic starter
 

Creative and nice solution Anders! Works perfect and als with deleting or adding rows (where indeed you sometimes have to adjust the helper column, but that's not a big issue). For this purpose of mine this is more than good enough.

Thanks very much!

 
Posted : 23/04/2020 8:08 am
Anders Sehlstedt
(@sehlsan)
Posts: 968
Prominent Member
 

Great, I’m just glad I could help.

Take care,
/Anders

 
Posted : 23/04/2020 1:25 pm
Share: