3 Replies Latest reply on Jan 15, 2013 7:41 AM by Robert Sinclair

# Filtering based on the performance of a Mark?

I am hoping someone more skilled than I can point me in the right direction when it comes to filtering data based intervals in the same dimension.  For example, in  plotting same store sales comps from quarter to quarter, how can a filter be created that will identify marks that show either gains or losses from Q1-11 to Q1-12 to be filtered?

This represents a small example, and manually excluding marks is not an option.

Thanks,

RS

• ###### 1. Re: Filtering based on the performance of a Mark?

Robert,

See what you think of this.  It uses a LOOKUP table calculation to find the previous value and find the difference with the current value.  I then added that calculation as a filter.

A couple of notes:

1. This is just the difference.  You could change it to a percent difference if that made more sense.

2. The first values are filtered out as there is no previous value.  The calculation could be adjusted to give those a value for difference if you needed to show them.

Hope this helps get you started!  Please let me know if you have any questions.

Joshua

• ###### 2. Re: Filtering based on the performance of a Mark?

Robert,

One other note: with that particular viz, you'll get some interesting behavior as you start to filter.  When points start to drop out because of the filter, then line will connect from the previous point that is still in the viz.  That could be misleading if the person using it doesn't realize that there is data missing from the view.

Joshua

• ###### 3. Re: Filtering based on the performance of a Mark?

Hello Josh,

Thank you for taking the time to answer my question.  Tableau has the best forum participants I have ever encountered!

I briefly attempted implementing your recommended solution yesterday (using the LOOKUP function).  However,  being limited on time, I was not able to get it to work. I will give it another go today and get back with you.  Thanks again.

Kind Regards,

rs