I got stuck on IF function.
What I want to calculate is
If profit >5000 then "Profit"
elseif profit <4999 and profit >1000 then "Breakeven"
This is my formula
If [Profit]>5000 then "Profit"
ELSEIF [Profit]<4999 and [Profit]>1000 then "Breakeven"
But tableau givs me a wrong result:
I can't find a mistake.
Can smb help.
Since you are using aggregation in your Text, you should use the same aggregation in your code as well.
If SUM([Profit])>5000 then "Profit"
ELSEIF SUM([Profit])<4999 and SUM([Profit])>1000 then "Breakeven"
and below is my result.
Hope this could help
Please let me know if you question.
Become a Viz Whiz on the Forums!
Support the Community and master Tableau.
Retrieving data ...