Skip to Content
0
May 30, 2016 at 02:11 PM

"moving" time axis / difference between two periods of time

45 Views

Hi Community,

my current challenge is to visualize a consideration of two time periods and the difference between them. Because there is a daily refresh I cannot use the filter mechanism to reduce my data. So I created a time dimension "CURRENT_DAYS" at first, which is defined like this:

if AddDayToDate(CurrentDate(), - 7) < {POSTING_DATE} and {POSTING_DATE} <= CurrentDate() then {POSTING_DATE}

So every day, when I'm looking at my data I have all data for the last seven days from today. This is my first time period.

The second time period also consists of 7 days. But this time, these days are before the 7 days of the first time period. I'll call this dimension "PREVIOUS_DAYS" and it is defined like this:

if AddDayToDate(CurrentDate(), - 14) < {POSTING_DATE} and {POSTING_DATE} < AddDayToDate(CurrentDate(), - 6) then {POSTING_DATE}

Now i can use these dimension as x-Axis. Is the the right way to create a "moving" time axis? Is there a possibility to use the current date as a filter property?

In my visualization I want to use a combined column line chart with the number of postings as Y-Axis and the "CURRENT_DAYS" as X-Axis. Secondly I want the difference between the postings on CURRENT_DAYS and PREVIOUS_DAYS as column chart. I need the difference from the first day of the first time period and the first day of the second time period, and the second day of the first time period with the second day of the second time period, and so on...

At the end it should look like something like this:

The blue line is the count of postings on the "CURRENT_DAYS" and the red/green columns are showing the difference of postings to the "PREVIOUS_DAYS" time period for each day.

Thank you very much!

Best regards,

Thorsten

Attachments

bild_fuer_scn.JPG (12.2 kB)