HI All,
I have one query which i need to assign bg color for each city on the data. Can you please help me how to apply bg color for each city using basic table tool based on sum of sales or city names with ascending order. Can you please assist me.
Solved! Go to Solution.
Changing color continuously is difficult, but coloring based on group is possible by Column Rules in configuration in Table tool like this.
In this example, Tile records into 5 group, and define colors depending on tile number.
any other solution this gives same city different color and i need each city has unique color.
There exists over 500 cities in dataset, and I'm not sure how to distinguish colors...anyway by using "Formula" option for column rule, I could manage to change color depending on the city(the same color for the same city). You can try this way. Good luck!
Here are the steps:
Sort Data: Use a Sort tool to sort your data based on either the 'Sum_Sales' or 'City' column in ascending order, depending on your preference.
Add Row ID: After sorting, use a Record ID tool to add a unique identifier to each row. This will be useful later when coloring the rows.
Formula Tool for Color Calculation: Add a Formula tool to create a new field that determines the background color based on the row number. You can use the Mod function to alternate between colors for better visibility.
Example Formula (assuming you sorted by 'Sum_Sales'):
This formula will make every other row have a light gray background.
Browse Tool: Use a Browse tool to check the results and make sure the color field is being calculated correctly.
Select Tool: Use a Select tool to remove unnecessary fields and keep only the columns you need in your final output.
Output Tool: Finally, use an Output tool to save the results to a file or another destination.
Can you please share the workflow to check and really thank you for the assistance.