One possible solution is in the workbook attached. It involves parameters, custom calculations and table calculations. The ~check sheet goes some way towards explaining how it works, but the idea is to select via parameter N number of weeks back from a selected date, and set up custom calculations to figure out for each row:
- is it within N weeks back (latest)
- is it within N previous weeks in relation to above (preceding)
The Period order calc allows to sort preceding and latest N week periods in the right order so that table calc can figure out the difference.
TIME AGGR SAMPLE DBedit.twbx.zip 74.4 KB
OMG Dimitri...this is awesome!!!
I have one more question for you...if I want the % chg to be versus SAME PERIOD YEAR AGO, instead of PREVIOUS PERIOD...can you help me with that? thanks a lot!
1 of 1 people found this helpful
Sure, that's an easy modification:
- make calculated field that finds dates between IRI we Date minus 1 year and N weeks and IRI we Date minus 1 year
- change Period Order calculation to use the above field instead of Preceding N Weeks, and the rest just works itself out
REALLY appreciate the help!!!
Thanks a lot!