3 Replies Latest reply on Nov 28, 2016 11:45 AM by matt meewes

# 1 measure with 3 independent Values

My question is this, I am working from a data source that unfortunately allows multiple values to exist under 1 measure. In the example workbook I've attached, I am able to filter down to those 3 values using the available dimensions. What I would ultimately like to do is subtract the "Maximum" from the "Minimum" if at all possible. I don't think it is possible but I thought I'd try the forums to see if there are any skilled tableau guru's out there who know how to do this. I know that it would involve creating a new calculated field, but as far as i know, I can not filter down a measure like I would like inside of a custom calculated field.

I look forward to your responses!

• ###### 1. Re: 1 measure with 3 independent Values

Create a calculated field like;

SUM(IF [Data Item Name] = 'Maximum' then [Aggregate] end) - SUM(IF [Data Item Name] = 'Minimum' then [Aggregate] end)

Then remove the 'Data Item Name' dimension from the rows shelf and you have your difference.

1 of 1 people found this helpful
• ###### 2. Re: 1 measure with 3 independent Values

HI Matt,

Find my approach as reference below and stored in attached workbook version 9.3

Minimum: if [Data Item Name]="Minimum" then [Aggregate] END

Maximum: if [Data Item Name]="Maximum" then [Aggregate] END

"Take and etc": if CONTAINS([Data Item Name],"Take and weigh 3 core") then [Aggregate] END

Delta: sum([Maximum])-sum([Minimum])

• ###### 3. Re: 1 measure with 3 independent Values

Thanks for the quick responses! Both answers achieve exactly what I was hoping for. Thank you very much!