I don't understand the question.
Are you saying if you filter out Week1, how can you still show %diff from week 1 in the week2 column?
There are ways to do that, but before I hack up an example, I want to make sure I understand what I'm aiming for.
1 of 1 people found this helpful
We're currently still on 9.0 here.
But I have 8.2, 9.0, 9.1 and 9.2 installed on my laptop.
I did one quick hack that (if I'm understanding the question correctly) lets you pick the week(s) to show, and you'll still have comparisons from the previous week even if you aren't showing the previous week.
If this is what you are looking for, I can explain what I did in there. See attached.
DummyData_use last Week value 2.twbx 295.3 KB
Just 8.2 though. I dumped my 8.0.
The second copy of the filter cuts out "missing". Edit the filter. you'll see what I mean. I used the second copy because it does something different from the first one. One does an "include" function (which is standard behavior), and the other does "exclude". And we don't need to display that filter because the user doesn't need to see what's happening there.
As for how this works, edit [week filter] and see what's there. It's a LOOKUP() function, which is a table calc. When we use a table calc as a filter, it doesn't operate the same way a standard filter works. Your usual filter excludes rows from getting into the table that is underlying the sheet. That's why, when you were filtering out actual week data, you couldn't get the prior information. It was excluded from the table.
But the table calc filter leaves the data in the underlying table and just filters what gets displayed from that table on the viz. It's a really cool tool. You can have a running_sum, for instance, and use the table calc to display only the last 6 months, and the first mark displayed will have the same value as if the entire line were displayed. It's a powerful technique.
And when you use it the way I did here in the filter, and when you display the filter to the user, he gets to select from all the valid choices, and Tableau dutifully gives him what he wants!
You can pick a single week, all weeks, any combo of weeks, and whatever you pick gives you your data because the underlying table is left intact.
i have been using your approach successfully (Week filter).
However, sine it is a calculation it doesn't allow to apply the filter to other worksheets. Have you found a way to use the Filter in multiple Worksheets?
Nope. Can't apply a table calc filter to other sheets.
Are you selecting a single week? Or are you selecting multiple weeks?
If a single week, you could select the week via a parameter, and then use the parameter value in the filter calc.
If multiple weeks ... well, I guess it will depend on specifics of your application, and it might or might not be doable.
I am selecting a single period. (single week). I created multiple Viz and put them in a Dashboard - they are using the same data source.
Yes, i have tried via Parameter. i just haven't figure out the syntax/logic for the calc filed
The parameter would be a Date parameter...and then create another calculated filed like this?
IF Parameter=Week 1 then "Week-Filter" END