Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I have a chart that shows instances calculated on dates. It calculates a lead time based on when a post is received (see formula below)
=class(today()-received_date, vBand)
now i want to restrict the chart to only show the dates with a lead time of MAX 200 days. I cannot set the x-axis to a max since i am going to need to be able to at occasion show the values that are greater than 200.
My suggestion would be to make an automatic selection (trigger) based on my table received_date and then select all TODAY()-200, but I cannot get this function to work. Help?
Cheers,
You are correct--it will select the largest 200 dates. So, for example, if I had every date from January 1, 2013 to today (December 3, 2013) in my date field, it would select everything from May 18, 2013 up to and including today (200 dates in all).
Hi,
try edit the dimension received_date and you write
= aggr(Date(MaxString({$<received_date = {'>=$(=(today() - 200))'}>}received_date ),'DD-MM-YYYY'),received_date )
sorry, cant get that to work . heres the sample btw
See it
actually this will not fly since it will not let me change the values in the graph in case i want to see something outside the interval. i would much rather we solved the problem by auto-selecting the dates from the table.
i have made some updates to this, but i still havent solved the original issue. I would still like to have the graph automatically select the first 200 dates from the received table when opened; the formula im looking for would be something like select(Today()-200) but I am not good enough at qlikview to make that formula happen. i cannot have the selection static though since i will need to be able to change it if needed.
Document Properties > Triggers > On Open
Select in Field: received_date
Search String: ='>='&max(received_date,200)
**EDIT: Example.qvw is attached.
thank you nicole!
i just have a follow up question: if understand your formula correctly this will select the first (largest) 200 values in the received_date table, not the values where today()-received_date <= 200?
the formula you presented works fine, i just want to know in order to understand better .
You are correct--it will select the largest 200 dates. So, for example, if I had every date from January 1, 2013 to today (December 3, 2013) in my date field, it would select everything from May 18, 2013 up to and including today (200 dates in all).
excellent - great!