Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
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

vWKEND as

=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
sunny_talwar

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

Best,

S

Not applicable
Author

CaptureX axisStart point.JPG

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

richard_pearce6
Luminary Alumni
Luminary Alumni

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