Is it possible to share your workbook ?
IF MAX([2 1. (Beer) In the past seven days, how many servings of the following alcohol beverages did you drink, both at home and away f])="YES" THEN "DRINKER" ELSE "NON-DRINKER" END
Hi Monica Erazo,
I believe you are using both Aggregated measure field and Dimensional fields in your calculation. This might caused you 'Cannot mix aggregate and non aggregate arguments with this function.
To resolve this, include ATTR function on all Dimensional fields used in that calculation.
I mocked up some data, created a calculated field based on your requirement and calculated field will detect Drinker and Non-Drinker values.
IF ( ATTR([Drink beer in Past Seven Days]) = 'Y'
AND ATTR([Both at Home and away]) = 'Yes'
AND SUM([Number of Servings]) > 0 )
Please find attached a sample screenshot. Also attaching sample workbook created in Tableau 10.4.1, to open this file, use Tableau 10.4.1 or later versions.
If you are error is different, let me know, I will help.
If the above solution satisfy your need, please change the status of this ticket to answered and close.
Calc_Tableau_10_4_1.twbx 18.3 KB