I have a calculated field as follow.
If [name]="TEST LEAD" then 0 else sum([Price])/100 end
I get the error "Cannot mix aggregate and non-aggregate comparisons or results in "if" expressions.
Does anyone know a workaround this?
4 answers
You tried:
If attr([name])="TEST LEAD" then 0 else sum([Price])/100 end
And Tableau threw the second error you described? Can you post a screenshot showing your calculation window, or provide a packaged workbook example, as suggested by Seth?
This looks like a calc that can also be easily replicated using the Superstore Sales dataset that ships with Tableau: