Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
ioannagr
Creator III
Creator III

master calendar date range in set analysis

Hi all, 

I have a YearMonthDate field in master calendar I want to use in a line chart.

I do this 

sum({<YearMonthDate={"(= '>=' & '1/1/2014' & '<=' & '31/12/2021')"}>}  bags)

 

 

but doesn't work at all. What am I doing wrong?

Thanks in advance!

14 Replies
JordyWegman
Partner - Master
Partner - Master

Try this one, it's the solution of @Anil_Babu_Samineni , but then with the Date# (interpreter). This one worked also in my example.

Sum({<YearMonthDate={"$(= '>=' & Date#('1/1/2014', 'Your Field Format') & '<=' & Date#('31/12/2021', 'Your Field Format'))"}>} bags)

Jordy

Climber 

Work smarter, not harder
ioannagr
Creator III
Creator III
Author

Haha, now works with everyone's solution!  

 

Thank you guys!

Dmk
Contributor II
Contributor II

Hello loannagr

Frist of all you have to make sure your data field has the same data type that your qlik app (in your case DD/MM/YYYY) default qlik data type is M/D/YYYY (atleast at mine).

the expression that i simulated and worked is: sum({<YearMonthDate={">=01/01/2014"}>*<YearMonthDate={"<=31/12/2021"}>} bags)

sunny_talwar

Nice... please mark the appropriate solution/s.

Best,
Sunny

Apprentice4life
Contributor II
Contributor II

Did you try separating it?

sum({<YearMonthDate={">=1/1/2014"} and YearMonthDate = {"<=31/12/2021"}>}  bags)

Also, make sure in your load script, the format of your date is set to "DD/MM/YYYY" and not "MM/DD/YYYY".