Qlik Community

New to Qlik Sense

If you’re new to Qlik Sense, start with this Discussion Board and get up-to-speed quickly.

Announcements
Qlik Insider: SaaS capabilities for Data Integration and Analytics, May 25th! 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
Partner

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)

 

Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)
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)

Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)
sunny_talwar

How about this?

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