0
votes

Just wondering if anyone knows how to get Previous Week/Previous Year/WoW/YoY data showing up in their data table in tableau if they've filtered the date range in the table (as it goes in a dashboard and I dont want it to show 5 years worth of data). Currently I use:

lookup(SUM([Daily_Total]),-7) for previous week, '-364' instead of '-7' for previous year. IT does show the right data for the previous 7 days if it is filtered there (i.e I have it filtered for the previous 10 days, so for 3 days I've got prev wk/WoW data) but I need it for all 10 days, anyone know how to do this?

Thanks

1
It's difficult to understand exactly what you're struggling with out of context. Try submitting your workbook to the calculations forum at Tableau's web siteAlex Blakemore

1 Answers

1
votes

I don't know if this will work for your case but you can try to create a calculated field field with just a call to the INDEX() function. Change this new field to Discrete.

After that, place the field in your workbook and put a filter on this field to choose only the row(s) or column(s) that you want. You may have to have to "edit calculation" for this field so that it makes sens for your case.

After you can hide the index field in the sheet by unselecting "Show Header". Hope this helps.