Skip to main content
Announcements
WEBINAR April 23, 2025: Iceberg Ahead: The Future of Open Lakehouses - REGISTER TODAY
cancel
Showing results for 
Search instead for 
Did you mean: 
Gaël
Contributor III

Set expression to retain only the 1st and 16th of month

Hi folks,

Instead of plotting data for each single calendar day, I want to plot them only for the 1st and 16th of the month.

The reason is this: when producing plots, Qlik Sense limits the number of data points displayed (like 4000 or 10000); use more and the graph looks ugly. Qlik Sense adds the annotation "* Currently showing a limited dataset.". I have data for just over 3 years (n=1000) for n=4 (or more) categories. Plot any less, and all is fine.  Plot more, and it gets weird:

Gal_2-1737121373349.png

I sought to limit the number of dates by the following expression, which does not seem to work:

={$<[Date]={"$(Match(Day([Date]),1,16)>0)"}>}[Date]

Check:

Gal_1-1737121315345.png

In the context of my data, it is reasonable to use the 1st and 16th instead of, say, Mondays, but the basic principle is the same.

What do you recommend?

Labels (5)
1 Solution

Accepted Solutions
JandreKillianRIC
Partner Ambassador

Hi @Gaël 

You have the right idea. 

In the back end add a field Day(Date) as DayNumber

In the set analysis just use DayNumber = {1,16} 

Alternatively you can try and add a = on the match. Like this "$(=Match("

Let me know if this works.

Mark the solution as accepted that solved your problem and if you found it useful, press the like button! Check out my YouTube Channel | Follow me on LinkedIn

View solution in original post

3 Replies
JandreKillianRIC
Partner Ambassador

Hi @Gaël 

You have the right idea. 

In the back end add a field Day(Date) as DayNumber

In the set analysis just use DayNumber = {1,16} 

Alternatively you can try and add a = on the match. Like this "$(=Match("

Let me know if this works.

Mark the solution as accepted that solved your problem and if you found it useful, press the like button! Check out my YouTube Channel | Follow me on LinkedIn

Gaël
Contributor III
Author

Thank you, @JandreKillianRIC! That's exactly what I found later that day. And not to apply the set expression on the date, but on the measure Sum({$< ... >} Headcount)

JandreKillianRIC
Partner Ambassador

Hi @Gaël 

Great news! Glad I could help! 

Happy Qlikking! 

 

Mark the solution as accepted that solved your problem and if you found it useful, press the like button! Check out my YouTube Channel | Follow me on LinkedIn