8 Replies Latest reply on Apr 26, 2013 7:47 AM by Sagar Dhekne

# Filter on Difference in Values

My situation is something like this:

Subject  Name  Visit         Score   %Difference

A           ABC    Week 1      26             0%

Week 2      27            3.85%

B           DEF    Week 1       23             0%

Week 2       22            -4.35%

C          GHI      Week 1       24             0%

Week 2       37            54.17%

%Difference is calculated Relative to First, For Subject Compute Using Name & Visit

I want to show only those subjects where the % Difference in between 2 visits is greater than 30%, so the first two subjects should be excluded as the % Difference is less than 30% only Subject C meets the criteria. I have attached a screen-shot of what the worksheet looks like.

What formula do I need to write and where?

• ###### 1. Filter on Difference in Values

If you post a packaged workbook that includes your "My situation is something like this" data you'll have a better chance of getting an answer. Think about the folks that want to give you an answer. Now think what would make their job just a bit easier. Now post a workbook that makes their job easier.

Just a thought.

--Shawn

• ###### 2. Re: Filter on Difference in Values

I was able to filter on the difference in values as you described. I first created a "Percent Difference From" table calculation with the difference calculated along the week and the value displayed as a percent difference from "Previous". I then added the same "Percent Difference From" table calculation to the Filters shelf, and set the filter to be at least 30% by setting the filter value to 0.30. You may optionally filter out Null values, which will hide all of the 0% cells and leave you just with the gains greater than 30%.

I have attached a Tableau 8 workbook with your sample data. The same approach works in Tableau 7. Hopefully this helps.

• ###### 3. Re: Filter on Difference in Values

Hello Steve, thank you for your reply. Unfortunately I cannot open this workbook. I have Tableau 7.0. Did you save it in version 8.0. Is there any way I can open it with my existing version? If not, is it possible for you to save it in 7.0? Thanks again.

-Sagar

• ###### 4. Re: Filter on Difference in Values

Hi Shawn & Steve, I have attached my workbook, the sheet where the problem is, is called 'ScreenChange', thanks.

• ###### 5. Re: Filter on Difference in Values

Sagar, just change your table calc on the filter shelf from use all to At Least and set the value to .3 like this:

--Shawn

• ###### 6. Re: Filter on Difference in Values

Hi Shawn,

I think I had tried this, my only concern was is there a way I can show the the original value that it changed from as well, for example:

Subject     Scale_Rater     Visit                         Score     %Difference

S0017     Bryant, Sharon     Screening               24          0.00%

Chini, Neelee     Phase A Baseline     37          54.17%

Right now it only shows the changed value which is above 30%. Is there any way to do this?

Thanks,

Sagar

• ###### 7. Re: Filter on Difference in Values

And ideally I was looking for values plus and minus 30%, so there is value -31%, I wanted this to be included too since it is >30, even though on the negative side. I guess it would difficult to get both the positive and negative on the same sheet along with the original values.

• ###### 8. Re: Filter on Difference in Values

I think I had tried this, my only concern was is there a way I can show the the original value that it changed from as well, for example:

Subject     Scale_Rater     Visit                         Score     %Difference

S0017     Bryant, Sharon     Screening               24          0.00%

Chini, Neelee     Phase A Baseline     37          54.17%

Right now it only shows the changed value which is above 30%. Is there any way to do this?

And ideally I was looking for values plus and minus 30%, so there is value -31%, I wanted this to be included too since it is >30, even though on the negative side. I guess it would difficult to get both the positive and negative on the same sheet along with the original values. I have attached my workbook in one of the replies.

Thanks,

Sagar