Using RANK in LOD: level of detail expressions cannot contain table calculations or the attr function in Tableau

Viewed 67
IF {FIXED [Customer Name]: (RANK(SUM(IF DATETRUNC('month', [Period])=#6/1/2019# THEN [Sales] END)))}<=10  THEN "Top 10"
 
ELSE "Others"
 
 
END

I want to find the Rank of each customer based on sum of sales for Jun 2019. I tried the above but got

level of detail expressions cannot contain table calculations or the attr function in Tableau

I need this Calculated Field to use as a Color Mark in a Stacked Bar Chart. In the Stacked Bar Chart, I want 1 color for the Top 10 Group of customers and another color for Other.

Thank you

0 Answers
Related