Skip to main content
Announcements
Live today at 11 AM ET. Get your questions about Qlik Connect answered, or just listen in. SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Dynamic last 15 days

Hello,

I have a line chart where i have:

Date as dimension

Expression as:

=sum({<Date_Clean={'$(vLast15Days)'}>} TotalPrice)

This gives me from today and 15 days back.

What if i want to make this dynamic, so if i select the 27 of august, it shows me 27 of august and 15days back.

Now its just static and i cannot select a date back in time.

I have these listboxed to choose:

Month, Year, Day

37 Replies
Not applicable
Author

Hi : here it is

What i want is - Now i can select Day on my listbox day, but i would like when i select a day, it shows in my graph 15days back from that day, and not just the day i selected

MEllinghausen
Creator III
Creator III

Hallo Thomas,

you must exclude the dimension year, month, day in the formula.

I think you should not give variables the same Names like Dimensions.

Look in the file.

Marcus

Not applicable
Author

But my variables are not named the same??? are they?

Anyways - Is it possible to make it so it starts by showing 15 days back from today?

In your example you have all dates to start with, but its first 15days back when you select a date, a month, a year?

MEllinghausen
Creator III
Creator III

Now it starts from today

Not applicable
Author

Yes - but does it work for you now? Cause now you cannot select a date. now it is static!

er_mohit
Master II
Master II

Try this

make sure that you have to mention the date format like below for my concern the date format for DATEFIELD  is below type

Sum({$<DATEFIELD={"$(=DAte(Max(DATEFIELD)-15,'DD-MM-YYYY'))"}>}TotalPrice)

Not applicable
Author

Hmmm.. But why should i need dateformat, when my dateformat in main script is the same as my date, and my variables are made with the dateformat YYYY-MM-DD - and i am using the numeric value?

and it does not work.

er_mohit
Master II
Master II

if you using num date

then no need to give date format

Sum({$<NumDATEFIELD={"$(=Max(NumDATEFIELD)-15)"}>}TotalPrice)

Not applicable
Author

yep - but its not working 😕 i have attached the file futher up in my posts.

MEllinghausen
Creator III
Creator III

take this,

you must set a action or a button where dato=today.

Here is set Action if open Document