cancel
Showing results for 
Search instead for 
Did you mean: 

conditional formatting in Pivot Table.

harish
8 - Cloud Apps
8 - Cloud Apps

Hii, I have pivot table merchant names and sales , now i want to color the  top 3 and bottom 3 of sales column , top 3 should be green and bottom 3 should be red . How can i achieve that

 

5 REPLIES 5

Benji_PaldiTeam
10 - ETL
10 - ETL

Hi @harish ,

Option 1: This solution can be applied if the pivot is sorted by the measure.

  • Add the dimension (e.g., 'Country') and the measure (e.g., 'Total Cost') to Pivot
  •  Select 'Conditional' in the color picker to specify conditions for coloring. Here, we need apply green to the top 3 rows and red to the bottom 3 rows.
  • Click the formula button for the first condition and insert the provided formula, ensuring to apply filter on the Country dimension in the formula. This will apply color to top 3 rows of the pivot. Here what we are doing is - taking the 3rd largest 'Total Cost' and apply color to all values in the pivot that are greater than this calculated value. Note that, 'Greater that or equal to' symbol is selected in the condition as highlighted in blue rectangle belowBenji_PaldiTeam_3-1702540754733.png
  • Similarly, configure the second condition by clicking its formula button and applying the provided formula, with the filter on the Country dimension. This will apply color to bottom 3 rows of the pivot. Here what we are doing is - taking the 3rd lowest 'Total Cost' and apply color to all values in the pivot that are lower than this calculated value. Note that, 'Less that or equal to' symbol is selected in the condition as highlighted in blue rectangle belowBenji_PaldiTeam_4-1702540984666.png
  • Click OK to apply the coloring.

  •  
    Benji_PaldiTeam_6-1702541254789.png

     

Option 2:

Use the Expandable Pivot plugin, which features an excellent tool known as Custom Data Format. This robust tool allows the application of custom rules to value cells, enabling the presentation of values in specific formats, merging two cell values into one, and more. A custom Paldi API is exposed for JavaScript developers, offering the capability to customize values. Each developer-added customization appears in the widget. Dashboard designers can effortlessly implement these customizations by selecting the desired options. Customizations added at the global level can be reused across any pivot, while those added at the widget level are specific to that widget.

Few example are:

Benji_PaldiTeam_7-1702541297193.pngBenji_PaldiTeam_8-1702541307233.png

Feel free to reach out if you have further questions, we're always happy to help 🙂
[email protected] 

Paldi Solutions, Number #1 Sisense Plugins Developer

But i have dynamic filters , like country , bank and month ,
i have kept the country = Thailand and bank as Aeon and month as 2023 October.

the pivot table displays the merchants and sales . then i am following you method  and  its not working , i am applying filter on merchants to get top 3 and bottom 3 it is not taking the merchants which are displayed after applying the dynamic filters instead of that it is taking among all merchants which are top3 and bottom3
which is wrong.

How do i solve this .

harish_1-1702550225541.png

 



Hi @harish ,

Is it working if you disable all the filters applied on filter panel (on right side)?

How did you applied filter to get top 3 and bottom 3? Is it using Ranking filter?

Benji_PaldiTeam_0-1702915867603.png

 

Feel free to reach out if you have further questions, we're always happy to help 

[email protected] 

Paldi Solutions, Number #1 Sisense Plugins Developer

 

harish
8 - Cloud Apps
8 - Cloud Apps

.

 

 

DRay
Community Team Member
Community Team Member

Hello @harish.

Were you able to get this resolved?

David Raynor (DRay)