How To Label Specific Points Above A Reference Line
Published: 28 Feb 2020 Last Modified Date: 08 Jul 2022
Question
How to display label specific points above a reference line.
Environment
Tableau Desktop
Answer
To show labels for specific points above the reference line for view like below where the reference line value is 50000:
1. Create a calculated field called All points above reference line with the following formula:
IF SUM([Sales])>50000 then SUM([Sales]) end
2. Create a calculated field called index with the following formula:
IF NOT ISNULL( [all points above reference line]) then INDEX() END
3. Create a calculated field called Rank with the following formula:
RANK([index], 'asc')
4. To show the first point above reference line, create a calculated field called Final Label with the following calculation: If [rank]=1 then ([all points above reference line]) END
5. Drag Final Label to Label on Marks Card
Thank you for providing your feedback on the effectiveness of the article.