7 Replies Latest reply on Aug 25, 2013 9:49 AM by Shawn Wallwork

Analyzing latest period & hiding previous periods

Hi all,

I have a series of data for which I will be constantly adding the latest month to. I have calculated variables within the viz which compare to previous periods.

I want to be able to only view one periods data at a time (and the associated calculations which refer to previous periods).

The only way I have found to do this is to not filter, but to hide the unnecessary  periods each time I append a months data. This way the previous months are still there to reference. This is cumbersome and manual and I want to automate it.

Is there a way that I can select one period of data and still have my calculations referring to other periods work? Ideally for me this would work just like a filter.

I have attached a dummy example csv and tableau to illustrate this. If you can set it up so that I can select one period and all the others will be hidden (and still have the calculation work) that'd be great.

Regards,

Nathan

• 1. Re: Analyzing latest period & hiding previous periods

Hey Nathan -

See attached. The trick is to use a filter which "hides" the other periods vs. truly filtering them out.

This can be accomplished by using a combination of LOOKUP and ATTR functions against the field in question:

lookup(attr([Period]),0)

Hope this helps!

• 2. Re: Analyzing latest period & hiding previous periods

Thank you Russell,

That achieves exactly what I was hoping for.

Are you able to explain at all why the formula hides and does not filter out the data?

Regards,

Nathan

• 3. Re: Analyzing latest period & hiding previous periods

Hi Russel,

Thanks for this advice.

I have a question on it. When I add the grand total for the column, I have all my data back (it's not hiding the other column anymore)

Do you know how I could have the total but just for the column I want to keep ?

Thanks

Benoit

• 4. Re: Analyzing latest period & hiding previous periods

Yes, I am haveing the same issue. Any substotal reveales the hidden data. Please advise.

• 5. Re: Analyzing latest period & hiding previous periods

Hi russell,

The attached looks great. One question, is it possible to just select one period in the filter and then show that periods data along with % diff for prev period. Right now we need to select atleast 2 consqutive periods to see the % diff.

• 6. Re: Analyzing latest period & hiding previous periods

Calculate Monthly occurrence only? (Part 2 of First Occurrence)

I am piggy backing my questions to Nathan's thread.   They both seem to be the same issues and people are asking the same questions.

It would appear this is something common that people are trying to do with "hiding" vs. "filtering" and showing correct totals both at a row and total levels.

• 7. Re: Analyzing latest period & hiding previous periods

Mark, I posted an answer over on the other thread.

Cheers,

--Shawn