Reputation: 64
I am trying to display Daily,Weekly,Monthly,Yearly data in a single Tableau data table. The base calculation is attach rate (sum(a)/sum(b)).
My main challenge is figuring out how to create a single table with multiple date ranges.
Upvotes: 1
Views: 447
Reputation: 1967
From your question it is not completely clear what you mean by daily, monthly, etc.
In any way you can do it by creating multiple calculated fields
If you want the average daily, monthly, devide the sum of your measure by the datediff between your two dates in days, months, etc. You might have to use {fixed} formulas to get the min and max date in order to get the days in between. That depends on your data structure.
If you want to show a measure for the last day, last week, last month, create an formula that outputs the measure if the the date is yesterday, within the last week, within the last month. here an example for the weekly sum:
IF datediff('days', [date], today()) < 7 THEN [measure] END
If that's not what you need, I would need some details as to how your data looks like and what exactly you want to display. Ideally a mockup of some sort.
Upvotes: 1