Forum Discussion
Sorting conditional formatting icons in the table
Hi Experts,
I am working on the table and it has a financial status column (few more column is there like the same logic) with conditional formatting icons used to show the status of the account (Red,Amer,Green) like below:
You can see currently in the column it is showing the order like RED,GREEN and then AMBER but the requirement is when we sorting the column it should list in the order like RED first , then Amber and then Green should come.
How to sort the order based on the color ?
Please help to achieve this ..
Thanks
DK
2 Replies
- bhanu_gautamSuper User
Anonymous , To achieve this first create a custom column and then sort on basis of that
SortOrder = SWITCH(
[FinancialStatus],
"RED", 1,
"AMBER", 2,
"GREEN", 3,
4 // Default value if none of the above match
)Select the "FinancialStatus" column in the Fields pane.
Go to the "Column tools" tab.
Click on "Sort by Column" and select the "SortOrder" column you created. - AnonymousNot applicable
Hi Anonymous ,
Based on my testing, please try the following methods:
1.Create the sample table.
2.Create the new column to filter the status.
financial status = IF([Financial] < 60, "red", IF([Financial] > 70, "green", "yellow") )3.Select the column and set the icons.
4.Create the new column to filter the financial.
SortOrder = IF([Financial] < 60, 3, IF([Financial] > 70, 1, 2) )5.Select the sort column by sort order.
6.The result is shown below.
Best Regards,
Wisdom Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.