cancel
Showing results for 
Search instead for 
Did you mean: 

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

0 Kudos

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

Accepted Solutions (1)

Accepted Solutions (1)

0 Kudos

With this dimension I created a common Axis for my relevant data:

if {POSTING_DATE} > AddDayToDate(CurrentDate(), - 14) and {POSTING_DATE} > AddDayToDate(CurrentDate(), - 7) then {POSTING_DATE} else if {POSTING_DATE} > AddDayToDate(CurrentDate(), - 14) then AddDayToDate({POSTING_DATE}, 7)

When I now create a custom calculation within the visualize room I finally get this chart:

That's what I was looking for!

Thank you!

Best regards,

Thorsten

Answers (1)

Answers (1)

TammyPowlas
Active Contributor
0 Kudos

Thorsten:

If your calculations are dimensions, then you can filter (based on my trials)

If the calculated measures, I didn't see a way to filter (using Lumira 1.30)

Have you tried it?

0 Kudos

Filter aren't a solution, because they are fixed. When I'm setting up a filter for the data of this week it will be still the same filter next week. But in the next week I want to see the data related to the week... but I just found a solution...