title: Tableau - Return a dimension with the MAX value
body: <p>I am pretty new with Tableau and I need your help for a visualization.</p>
  
  <p>I have Col.1 = Country; Col.2 = Product name; Col. 3 = #Sales</p>
  
  <p><strong>I want to make a table that displays for each Country the Product name that has the maximum amount of sales.</strong></p>
  
  <p>E.g. </p>
  
  <p>Country | Product<br>
  AT      | Shoes</p>
  
  <p>where shoes is the product with the max sales.</p>
  
  <p>I had thought of a calculated field like this: <strong>if sum[Sales] = max([Sales]) then [Product Name] else Null END</strong> but it gives me an error.</p>
  
  <p>Any idea of how to solve it?</p>
  
  <p>Thanks in advance for any help given!</p>