I think many people would have asked about this problem, unfortunately, I am unable to find the solution.
I have hard coded date values for 2 months dated 07/30/2016 by the name July_date and 08/01/2016 by the name August_date. I have one column by the name of datePurchased.
I have written a calculated field but is giving an error:
IF ([datePurchased]) <= [July_date] THEN Count([OrderNumber])
ELSEIF ([datePurchased]) >= [August_date] THEN Count([OrderNumber 2])
The error is "Cannot mix aggregate, non-aggregate comparisons or results in IF expressions"
Can someone please help me out with this. The data set is in MS Excel.
Resolving "Cannot mix aggregate and non-aggregate arguments" Calculation Error | Tableau Software
Try adding ATTR to your dimensions inside the equation. Example: replace [datePurchased] with ATTR([datePurchased])
Without a TWBX, I'm not sure just which of the fields is throwing up the error, but you can experiment until you find the right one.
Become a Viz Whiz on the Forums!
Support the Community and master Tableau.
Retrieving data ...