Forum Discussion

somnath6309's avatar
somnath6309
Copper Contributor
Jul 15, 2025

Conditional Formatting Rules for Icon Sets

Hi,

The following pivot table has been created using Conditional formatting Icon Sets :

However, the Default Formatting Rule applied by Excel is not understood. Following is the screen shot of Formatting Rules:

Under the Formatting Rule Section:

01. The Green Icon is applicable when the value is >= 67 %

02. The Yellow Icon is applicable when value is < 67 % but >= 33%

03. The Red Icon is applicable when the value is less than 33%. 

The above Rule is clear but in my following pivot table data I have not achieved 67% or 33% of Total Revenue. Pls take a look of the screen shot :

In Column E , Sales_Amount / Grand Total does not achieve 66% or 33%. All values are less than 33%. But Icons in Col B are appearing in Red, Green and Yellow. 

Pls let me know what is the logic behind the application of Icon Sets in Col B (Sum of Sales Amount). 

However, Same Default Formatting Rule is applied in Col D (Sum of Dollar per Hour). Pls see the screen shot below:

However, it is not clear on which amount 67% and 33% are getting calculated. In Pivot Table CALIFORNIA has Dolloar Per Hour ( Sales Amount / Contracted Hours) 68.30 and it is getting Yellow Icon. 

Pls let us know the logic / Calculation of : 67% and 33% for Dollar per Hour. 

I have also attached the Excel file for reference. 

Regards,

Somnath6309

6 Replies

  • somnath6309's avatar
    somnath6309
    Copper Contributor

    Hi, JKPieterse​ ,

    applied your formula to calculate the Percentages. Pls see the Column E of the following screen shot :

    I tried to calculate the Sales Amount Pct. The formula bar contains your formula. 

    All the Pct values in Col E, are appearing in Negative figure as we are deducting the Max value from the Current Value. Pls note that the Pct for Maximuam Amount is coming 0% and for Minimum Amount is coming 100%. However, if we remove the Minus sign by using ABS() Function, the resulting values do not qualify the formatting rule. 

    If the Formatting Rule follows the aforesaid calculation, the Sales amt of CANADA, DALLAS and DENVER, for example, should get "Green" icon because Sales Pct in Col E exceeds 67%.

    I wish there should be some correction in the formula. Will wait for your reply. 

    Regards,

    Somnath6309

    • JKPieterse's avatar
      JKPieterse
      Silver Contributor

      Right, yes, the denominator of the formula is wrong and should be reversed:

      (MAX($B$4:$B$17)-B4)

    • SergeiBaklan's avatar
      SergeiBaklan
      Diamond Contributor

      It's not clear what you'd like to receive. Here

      on the left "default" rule which applies green to the values for which

      (value - min) / (max - min)

       is greater than 66%, similar for next ones.

      On the right we apply green to the values which are greater than 10% of total sum, yellow to ones between 5% and 10% of total sum, red to the rest.

      Depends on goals you may generate another variants.

  • JKPieterse's avatar
    JKPieterse
    Silver Contributor

    It takes the max value in your data and uses that as 100%. The minimum value is 0%. The percentages are calculated as (CurVal-MaxVal)/(MaxVal-MinVal) and those numbers are used to choose the icons.

    • somnath6309's avatar
      somnath6309
      Copper Contributor

      Hi, JKPieterse​ 

      applied your formula to calculate Pct_CalcOfSalesAmt. Pls see Column E :

      The formula bar screen shot for reference:

      However, we are subtracting the Maximum Value from the current value, and hence, all the values are appearing in Negative figure. The Maximum Value INR 2254735 is calculated 0% ( Cell E5) and Minimum Value comes to 100%. 

      If we remove the Minus sign by using ABS() Function that returns an absolute value, the resulting values of the formula do not qualify the formatting rule. For example, CANADA, DALLAS, DENVER sales amount should get "Green" icon as the Sales Pct in Col E exceeds 67%.

      Will wait for your reply. 

      Regards

Resources