2 Replies Latest reply on Aug 24, 2017 6:45 AM by Vishal Somani

# Sum certain values based on parameter

Hi,

I am trying to get something like the below within Tableau:

There is a parameter for the shortfall column which states that if it results into a positive figure then make it zero. If its negative,   then show the value as the second column.

i.e. if the target is lower than Act, then make it zero.

However when I sum the "Grand Total", it shows me a total of £1,400 simply because it recognises the masking done, however calculates the shortfall of the first column to 2, and getting the value of £100.

Can anyone help in identifying how I can only add the negative values?

thanks in advance.

 Act Unit Cost Target shortfall Grand Total 10 £50 8 0 £0 70 £50 100 -30 -£1,500
• ###### 1. Re: Sum certain values based on parameter

Hello Vishal,

As i understand your requirement, i don't think you need parameter. Below is the snapshot of sample view as required. I have attach workbook also for your better understanding.

TG

• ###### 2. Re: Sum certain values based on parameter

Thanks however this is something which we are doing and working fine. Its totalling the grand total which is not working as it should. Do you have any ideas?