What's the logic behind the calculation. Are you trying color the sales, if it > X or X< or =X?
Just trying to put a simple example in the attachment.
Please let me know if it helps.
Colory By Calculation.twbx 1.2 MB
Thanks for answer
I Just want add color every bar in the view with different color
Drag continent to color.
I want achive this by using calculated field
What's the formula for your calculated field? Can you type the formula here? Something seems off in the calc.
If sum([Sales]) <1500 then "GREEN"
elseif sum([Sales]) >=1500000 and sum([Sales]) <2500000 then "RED"
elseif sum([Sales]) >=250000 and sum([Sales]) <5000000 then "Yellow"
else "BLUE" end
It looks like it is correct, I am not sure why that wouldn't work on color. It looks like you are just using the superstore dataset. Maybe you just want to attach your workbook? Which version of Tableau are you using? The formula you wrote doesn't match your screenshot that says 'true' and 'false' on color? I would recommend posting the workbook.
The example that I have provided should be work?
Did you look at the workbook that I have attached (Tableau 9.1 version)
On Feb 7, 2016 11:14 AM, "Pooja Gandhi" <email@example.com>
1 of 1 people found this helpful
Try like this:
1. create one calculated field,
IF SUM([Sales]) < 100 THEN "RED"
ELSEIF SUM([Sales]) > 100 AND SUM([Sales])<300 THEN "Blue"
2. Drag this calculated field in Colours box.
3. If you want you can change/ Edit the colors according to your requirement.