Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
I have the following question. I have a Date dimension. This dimension is a part of the cyclic group which is used in a Straight Table. I have a column in which i need to calculate a value for the the according date - 1 week (7 days).
Please see a screenshot of the straight table:
Basically I need to calculate values in the second column for the dates previous to dates in the first column. So in the first row of my table I need to calculate data for 05/02/2015. In the second row of my table I need to calculate data for 05/09/2015.
Can you please advise how I can do this?
I think you need a kind of AsOf table that links each week with the previous week:
AsOfWeeks:
LOAD distinct Week as ReportWeek, Week, 'Current' as Period
Resident ...
Concatenate(AsOfWeeks)
LOAD distinct Week as ReportWeek, date(Week-7) as Week, 'Previous' as Period
Resident ...
You can then use ReportWeek as dimension instead of Week and expressions like sum({<Period={'Current'}>}Value) and sum({<Period={'Previous'}>}Value).