Qlik Community

QlikView Creating Analytics

Discussion Board for collaboration related to Creating Analytics for QlikView.

QlikWorld 2020: Join us May 11 - 14, 2020 in Phoenix, AZ. Register early and save $400. Learn More
Not applicable

Dates in a variables - how to set a date

I have a set analysis in a variable which restricts the X Axis from showing all the Week Endings

i.e. vWKENDMAX showing the last point on the x axis


date(max([Week Ending])-21) 

I now need the x axis to start at a specific point.  The activity in the graph start at specific point so for instance it would let me specify


=01/01/2014 in the variable.

but because I have a rolling date range in my loading script I want the start point on the X axis to start either on this date or if the rolling range passes this point I want it to  read something like this:

=date(Min([Week Ending])+21) 

How would l write this please?

I tried an IF statement in my vWKEND but it didn't seem to work.

Please advise

Thank you

3 Replies

Re: Dates in a variables - how to set a date

Not sure what you are trying to accomplish. Would you be able to post some sample data with your expected output here?



Not applicable

Re: Dates in a variables - how to set a date

CaptureX axisStart point.JPG

I would like X axis to start from the approx 01/01/2014


Re: Dates in a variables - how to set a date

You would need to add set analysis into all of your expressions.

something like:

Sum( {<Date={">01/04/2015"}>}  Sales)

Once its working you can substitute the hardcoded date to a variable