8 Replies Latest reply on May 13, 2018 6:33 PM by michelle.kevill.0

# Filter on decrease/increase

Hi,

I want to filter out people who have been a consistent number for 3 months (Person C,E, F) and ONLY include those who have dropped/decreased from Month 2 to Month 3 (Person A,B, D)

I need something that will calc a difference (mainly a decrease) and include those Persons only in my view

Thanks

• ###### 1. Re: Filter on decrease/increase

Hello Michelle,

Below should work

Drag this to filter and select YES.

Thanks,

Ritesh

• ###### 2. Re: Filter on decrease/increase

Please mark it as CORRECT/HELPFUL & close the thread so that it can help others as well

Thanks,

Ritesh

• ###### 3. Re: Filter on decrease/increase

Thanks Ritesh - only issue with this is my 'months' are in one date field

I need something like below that would look at the months i specify:

if datediff('month', [date], 'jan') < datediff('month', [date], 'feb')

then true else false

end

Thanks

• ###### 4. Re: Filter on decrease/increase

Hi Michelle,

Suppose your dataset is like below then you should see only Person A and C.

Create a CAL field like below and drag it to rows and set as TRUE

ZN(SUM([Points])) - LOOKUP(ZN(SUM([Points])), -1) < 0

Also note,

Hope it helped ! Let me know if you still face issues.

Thanks,

Ritesh

1 of 1 people found this helpful
• ###### 5. Re: Filter on decrease/increase

Thank you so much !! This worked perfectly !!

• ###### 6. Re: Filter on decrease/increase

Just hit the CORRECT answer so that the answer can help others as well.

Cheers,

Ritesh

• ###### 7. Re: Filter on decrease/increase

Closing the thread is a nice practise to follow , hope that you get a chance to do so.

Please mark it as CORRECT and HELPFUL if it really helped you so that it can help others as well.

Thanks,

Ritesh

The Slogger Blogger at www.tableauinfo.com

• ###### 8. Re: Filter on decrease/increase

Hi