-
1. Re: Aggregate rows in a time interval to the last date of the interval
Yuriy FalJun 19, 2016 3:52 PM (in response to Pierre-Marie Airiau)
Hi Pierre-Marie,
What you're trying to achieve could be done
with Moving Window Table Calculation.
Please find the attached as an example.
Hope it could help.
Yours,
Yuri
-
Moving 30-day Sales.twbx 1.2 MB
-
-
2. Re: Aggregate rows in a time interval to the last date of the interval
Pierre-Marie Airiau Jun 20, 2016 5:07 AM (in response to Yuriy Fal)Thanks, you answered nearly every question I had.
There is still 2 tricky points I would like to answer :
- if I have no profit for a day, and so no line in the profit table for that day, is there a way to handle this situation because the moving table calculation will find rows older than 30 days (if one day is missing, the window will then in fact be 31 days and not 30)
- an even more complex situation, where profits would not even be aggregated on a day but will stay at one line per contract with a time attribute (and so the number of lines per day is unknown). Is there a way to do this without aggregate the contract lines on the day.
Thanks,
-
3. Re: Aggregate rows in a time interval to the last date of the interval
Yuriy FalJun 20, 2016 7:42 AM (in response to Pierre-Marie Airiau)
1 of 1 people found this helpfulHi Pierre-Marie,
The answers could be quite simple:
-- If you have missing dates in your data,
you could set Show Missing Values flag to ON
on your Day([Your_Date]) Green Pill on Columns.
This would trigger a domain padding for Dates
(a special kind of data densification in Tableau),
so Tableau would draw Marks for every day --
even if there's no row for it in a datasource.
-- Your second point is not a problem whatsoever,
since your Measure (Profit or Sales in my example wb)
is aggregated on a view (as SUM([Sales]) ) anyway.
Hope this could help.
Yours,
Yuri
-
4. Re: Aggregate rows in a time interval to the last date of the interval
Pierre-Marie Airiau Jun 21, 2016 7:54 AM (in response to Yuriy Fal)yeh it was quite simple indeed
Thanks