Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Pomna
Creator III
Creator III

Exclude Current month

Hi experts,

I need your help to exclude current month inventory. Below is the  expression I use to get Jira tickets closed last month. But I need to get the remaining inventory for tickets not closed last month excluding current month. That is, tickets that were not closed last month excluding the ones created for current month. Any suggestions?

 

SUM({<[Closed Date] ={">=$(=MonthStart(Today(),-1)) <=$(=MonthEnd(Today(),-1))"}>} [Closed Count])

5 Replies
JordyWegman
Partner - Master
Partner - Master

Hi Ngumdo,

The problem probably lies in the date format. When you work with dates, always try to floor them (make numeric numbers) for minimizing these kinds of problems.

In your script, floor the date Closed Date and try this formula:

SUM({<[Closed Date] ={">=$(=floor(MonthStart(Today(),-1))) <=$(=floor(MonthEnd(Today(),-1)))"}>} [Closed Count])

 Jordy

Climber

Work smarter, not harder
Pomna
Creator III
Creator III
Author

Thanks but that did not solve my problem

dplr-rn
Partner - Master III
Partner - Master III

your expression looks accurate. what is the chart you are using this expression in. What is the output
check format of you Closed Date field.
try to make set expression format the same.
JordyWegman
Partner - Master
Partner - Master

Hi,

Can you show us a table with the [Closed Date]?

Jordy

Climber

Work smarter, not harder
Pomna
Creator III
Creator III
Author

Count({$<[Date Created]={"=[Date Created]<MonthEnd(AddMonths(Today(),-1))"},[Status Name]=- {'Closed'}>}DISTINCT [Issue ID])

 

The above is another code I got to exclude jira tickets for current month.  I still do not get the right result . That is, only  tickets that were opened before current  month and  where still open or not closed by beginning current month. This should exclude all tickets opened in current month. I have also attached the data model. Any suggestions is greatly appreciated.

Thanks