KNOWLEDGE BASE

## Finding the Dimension Member with the Highest Measure Value

Published: 10 Oct 2017

### Question

How to show a the dimension member with the highest measure value.

### Environment

Tableau Desktop 9.0 and later versions

The attached example workbook uses the sample data set Superstore to demonstrate the following instructions:
1. Select Analysis > Create calculated field
2. Name the calculated field "Maximum regional sales", enter the following formula and click OK
`{FIXED : MAX( { FIXED [Regions] : SUM( [Sales] ) } ) }`
3. Add the calculated field to the rows shelf
4. Select Analysis > Create calculated field
5. Name the calculated field "Region with highest sales", enter the following formula and click OK
```IF { FIXED [Regions] : SUM( [Sales] ) } = [Maximum regional sales]
THEN [Regions]
END
```
6. Drag [Region with highest sales] to the Rows shelf.

If the returned value is a measure, not a dimension (such as Date), it will need to be aggregated. In this case, the second calculated field should be replaced by the below formula:
1. Select Analysis > Create calculated field
2. Name the calculated field "Date with highest sales", enter the following formula and click OK
```If { FIXED [Regions] : SUM( [Sales] ) } = [Maximum regional sales]
THEN "Max Date"
END```
3. Bring the Date field into the view.
4. Bring the "Date with highest sales" field to the Filters card and include only "Max Date". This will only keep date values that are associated with the "Max Date" value.