Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik GA: Multivariate Time Series in Qlik Predict: Get Details
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How can we restrict calendar years to be selected?

Hi all,

I’ve created calendar object with vFromDate and vToDate variables.

Variables created in variable overview window are:

vFromDate = Floor(Date#(‘2013-01-01’, ‘YYYY-MM-DD’))

vToDate = Floor(Date#(‘2013-06-30’, ‘YYYY-MM-DD’))

Questions: How can I restrict the number of years to be selected in calendar (suppose I want to show only 2013, 2014, 2015)?

After assigning variables to bar chart I am able to see converted number (expression converted to number e.g., 41362) in variable overview window. Why it is not showing the defined expression?

Can you please help on this?

Thank you.

Regards,

Srinivasu

1 Solution

Accepted Solutions
ashfaq_haseeb
Champion III
Champion III

Hi,

Download my file again.

I have fixed your Expression.

Or use this expression.

=Sum({<SalesDate={'>=$(=Date(vFromDate,'YYYY-MM-DD'))<=$(=Date(vToDate,'YYYY-MM-DD'))'}>} Value)

Regards

ASHFAQ

View solution in original post

6 Replies
sujeetsingh
Master III
Master III

You can limit it by using clause YEAR>=2013

sujeetsingh
Master III
Master III

use Date() to convert it to numbers

mdmukramali
Specialist III
Specialist III

Dear,

to restrict the Years in calender object you need to specify the Min Value and Max value

Min value

=Min(Date(vFromDate))

max Value:

=AddYears(Max(Date(vFromDate)),2)

ashfaq_haseeb
Champion III
Champion III

Hi,

May be like this.

Regards

ASHFAQ

Not applicable
Author

Hi Ali

Can you please check this as well

After assigning variables to bar chart I am able to see converted number (expression converted to number e.g., 41362) in variable overview window. Why it is not showing the defined expression?

Regards,

Srinivasu

ashfaq_haseeb
Champion III
Champion III

Hi,

Download my file again.

I have fixed your Expression.

Or use this expression.

=Sum({<SalesDate={'>=$(=Date(vFromDate,'YYYY-MM-DD'))<=$(=Date(vToDate,'YYYY-MM-DD'))'}>} Value)

Regards

ASHFAQ