Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Save $600 on Qlik Connect registration! Sign up by Dec. 6 to get an extra $100 off with code CYBERSAVE: REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Current Month

Hi,

I would like to add a where clause to my data load editor to restrict data up to the current month. Can someone please assist me with how to add the below:

WHERE Date <= CurrentMonth

All the searches I have done in the forum only return calculations e.g. SUM

Thank you in advance for any assistance.

1 Solution

Accepted Solutions
ishanbhatt
Creator II
Creator II

Hi Raman,

If you want to restrict data up to the current month then use below mention solutions.

1. If you want to consider the whole month then,

          Where Date <= Monthend(Today())

2. If you want to load data up to today then,

          Where Date <= Today()

* Make sure that Date field format and system format are same.

View solution in original post

4 Replies
gerry_hdm
Creator II
Creator II

where month(Date) <= month(Today())

greetings Gerry

rahulgoyal1287
Contributor III
Contributor III

Hi Raman,

You can compare any date with following expression:

monthstart(TODAY())

it will return 1st day of the current month.. so you can compare it by using Field1 <= monthstart(TODAY()) .....

Hope it helps.

Best Regards,

Rahul

ishanbhatt
Creator II
Creator II

Hi Raman,

If you want to restrict data up to the current month then use below mention solutions.

1. If you want to consider the whole month then,

          Where Date <= Monthend(Today())

2. If you want to load data up to today then,

          Where Date <= Today()

* Make sure that Date field format and system format are same.

Anonymous
Not applicable
Author

Thanks, guys!