Skip to main content
Announcements
Live today at 11 AM ET. Get your questions about Qlik Connect answered, or just listen in. SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

How to filter out the current month in a expression?

Hi,

I have the following expression:

Count({$<CaseClosed = {"=Date#(YRMON, 'YYYY-MM') > MonthStart(Today(), -10)"}>} DISTINCT CaseClosed)

This expression is including the current month, I will like to have as MonthStart last month, but I tried Today()-1 but it still displays the current month.

Any idea on how to do this?

1 Solution

Accepted Solutions
tresesco
MVP
MVP

May be this?

Count({$<CaseClosed = {"=Date#(YRMON, 'YYYY-MM') > MonthStart(Today(), -10)

                                                  AND

                                            Date#(YRMON, 'YYYY-MM') <= MonthEND(Today(), -1) "}>} DISTINCT CaseClosed)


I am not sure if you need MonthStart or MonthEND for the last month..check your logic and use it accordingly.

View solution in original post

1 Reply
tresesco
MVP
MVP

May be this?

Count({$<CaseClosed = {"=Date#(YRMON, 'YYYY-MM') > MonthStart(Today(), -10)

                                                  AND

                                            Date#(YRMON, 'YYYY-MM') <= MonthEND(Today(), -1) "}>} DISTINCT CaseClosed)


I am not sure if you need MonthStart or MonthEND for the last month..check your logic and use it accordingly.