Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
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.