1 of 1 people found this helpful
Just use attribute. example:
IF ATTR([State]) <> 'Alabama'
Trust this helps.
Good morning -
What tableau is telling you is that you created an aggregation in one of the values you put in the formula and you will need to aggregate the other variables to make the calculation valid
Aggregation functions are not limited to sum() but include Min(),Max, count(), countd(), avg() , attr() and others
Not knowing where the aggregate is in your function I would suggest
IF Attr([MS])<>"BI" and attr([MS]) <> "BO"
then ( sum([Correct Stock AS])/([Total GI QTY]/-5)
ELSEIF attr( [MS]) = "BO"
then (sum([Correct Stock AS])/([Total GI QTY -3 years]*-1))
but that is assuming that [Total GI QTY and Total GI QTY -3 years] are the aggregates
If this posts assists in resolving the question, please mark it helpful or as the 'correct answer' if it resolves the question. This will help other users find the same answer/resolution. Thank you.
Because you did not attach workbook, so I don't know if these measures: Correct Stock AS, Total GI QTY, Total GI QTY -3 years, are aggregated or non-aggregated. If they are aggregated, then you need to add ATTR before dimension MS.
Hope it helps.
I really appreciate your input and your support. It solved my challenge.
Have a great day
if this solved your issue please mark my response correct to close the thread
You are welcome!
Please mark my response as correct and helpful.