Hi everyone,
I have a dataset that looks like so:
Channel Audience Sport
NBC 1000 Football
FOX 2000 Baseball
I want to return the name of the channel that has the highest audience.
I'm using the below formula which is working as it returns 'FOX'
If ([Audience (Individuals)]) ={(max([Audience (Individuals)]))}
THEN [Channel]
END
My question is: how do I add the Sport variable/column into the formula, so Tableau returns the channel name of the highest 'Football' audience (in this case NBC)?
Thank you!
Arthur
12 answers
Use this:
{FIXED Country, Sport:MAX(IF Country='USA' and Sport='Football' and ({MAX(Year)}=[Year]) THEN [Audience]END)}=[Audience]