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

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
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

Hi,

Try this:

Sum({$< YearMonthDate = {">='1/1/2014', <= '31/12/2021'"}>}bags)

Jordy

Climber 

Work smarter, not harder
Anil_Babu_Samineni

Why static? Anyway - Try this?

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

 

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
ioannagr
Creator III
Creator III
Author

 

@JordyWegman  Thank you, This returns "this chart can't be displayed because it contains undefined values" 😞

ioannagr
Creator III
Creator III
Author

@Anil_Babu_Samineni  your solution returns the same as before, a chart with all the master calendar dates, not only this selection

 

 

I want it static because I want only this selection displayed!

 

thank you

sunny_talwar

How about just this

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

For making it static, you can try this

Sum({1<YearMonthDate = {">=1/1/2014<=31/12/2021"}>} bags)
ioannagr
Creator III
Creator III
Author

@sunny_talwar  Still, can't be displayed.

 

I'm thinking maybe I'm writing the date format in the wrong way.

 

In the chart it is displayed as "D/M/YYYY"

 

but in my main table, the field of interest is like :

date(floor(creation),'DD/MM/YYYY') as creation  .

 

Could this be a problem? Does any of you know? @sunny_talwar  @Anil_Babu_Samineni  @JordyWegman 

Anil_Babu_Samineni

How is the format of "YearMonthDate" field? Use same as compare field format

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

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
sunny_talwar

How about this?

Sum({1<creation = {">=01/01/2014<=31/12/2021"}, YearMonthDate>} bags)