How to Highlight the Max Value in Tableau

How do you highlight the max value in tableau in this example I have a table with kpi business line and product and i’ve highlighted the max value in each business line I can also highlight the value across the entire table with a different calculation let’s take a look at how to do this in tableau. If this is your first time here make sure you like And subscribe for more Tableau content let’s start by writing a calculation let’s create a calculated field we’re going to use a level of detail calculation in this example we call it max value just put all after it. I want to start by typing an include statement so include I want to include business line and product put a colon and drag in my kpi field and with a curly bracket if your kpi field is not aggregated you will have to aggregate it within the level of detail. Let’s take this include statement and graph it with another level of detail just a curly bracket and we’ll take the max of my include statement. Business line product and giving the kpi so that’s forcing the level of detail to be at business line and product and then excluding both of those and outputting just the max now all I have to do is test if kpi is equal to that max value kpi is aggregated so you have to aggregate foreign the bottom one as well don’t apply okay and let’s drag that onto color and you can see that I have one true value and all false values I can adjust this calculation to be for each business line by adjusting the calculation here instead of fixing the max across the entire table. I’m going to exclude propped and then take the max so all I did to convert this to before each business line is I excluded product I told Tableau to exclude the product and take the max so just for a business line give me the max value click apply. Okay now I have two orange values one for each business line there’s one other way to highlight and that’s using a table calculation so it’s accurate create a calculated field and just say Max table. This time I’m going to Type window Max of kpi close a parentheses again if kpi was not aggregated you would have to aggregate it using something like sum. Let’s just leave it at window Max for now and test if kpi is equal to the window Max. It’s going to be a yes or no click apply okay. Let’s find Max of table put it on color and you can see that 608 is highlighted Orange I can adjust this by editing the table calculation and telling Tableau how to Index this Max so if I wanted to be for each business line I would uncheck business line now I have an orange value for each business line hope that helps.