Skip to main content
Announcements
SYSTEM MAINTENANCE: Thurs., Sept. 19, 1 AM ET, Platform will be unavailable for approx. 60 minutes.
cancel
Showing results for 
Search instead for 
Did you mean: 
richard24best
Creator II
Creator II

Select last day of the month and current day

Hi All,

 I have a table which feeds data daily

1st Dec......31stDec, 1st Jan....27th Jan...

My requirement is that from the table the Qliksense should pick only last day of each month and current day (as the dashboard also should refresh daily).

Could you please help me out how its possible to implement in Qliksense?

Regards,

Richard

Labels (1)
1 Solution

Accepted Solutions
richard24best
Creator II
Creator II
Author

I was able to figure out myself by loading the table twice

while running the table 1st time i entered the below 

where REPORTINGDATE like MONTHEND(REPORTINGDATE);

2nd time same table load entered the below

where REPORTINGDATE = today() and not exists (REPORTINGDATE);

Its working perfect by pulling last day of each month and current day.

Thanks all for your time and support

View solution in original post

4 Replies
Channa
Specialist III
Specialist III

today() this will help you to get date of Month

MonthEnd(date) this will get end date of month 

add these two columns and try

Channa
anat
Master
Master

Can you try like below

If(Month(DATE)=Month(Today()) and Year(DATE)=Year(Today()), Date(Floor(max(DATE))), If(Floor(DATE)=Floor(Monthend(DATE)), date(DATE)))as DateEnd;

May be bit changes require in above script. 

richard24best
Creator II
Creator II
Author

Hi Channa,

Thanks for your answer.

MonthEnd(date) works to get the last day of each month but when i use today() function its not pulling todays data. Attached is the output image for your reference.

I am using this condition while retrieving data from table - 

where REPORTINGDATE like MonthEnd(REPORTINGDATE) and
today();

Could you please check and advice?

Appreciate your support in advance.

Regards,

Richard

richard24best
Creator II
Creator II
Author

I was able to figure out myself by loading the table twice

while running the table 1st time i entered the below 

where REPORTINGDATE like MONTHEND(REPORTINGDATE);

2nd time same table load entered the below

where REPORTINGDATE = today() and not exists (REPORTINGDATE);

Its working perfect by pulling last day of each month and current day.

Thanks all for your time and support