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: 
Pomna
Creator III
Creator III

Previous 12 Months

Hello Experts I need your help. Below is my code which works well but returns more data than I want. The code returns all jira tickets created last month or prior to last month and not closed or done last month. That is, still open by the beginning of this month or closed this month. All I need is to return only 12 months  from May 2018 to May 2019.

Thank you


Count({$<[Date Created]={'<$(=MonthStart(Today()))'},
[Status Name]=-{'Closed','DONE'}> +
<[Date Created]={'<$(=MonthStart(Today()))'},
[Date Closed] = {'>=$(=MonthStart(Today()))'}> }DISTINCT [Issue ID])

6 Replies
Channa
Specialist III
Specialist III

=Sum({$<[Ship Date]={">=$(=MonthStart(Today(),-12))<$(=monthend(Today(),0))"}>}Sales)

 

you need to try  like this

Channa
Pomna
Creator III
Creator III
Author

Thanks but that's not what I need. My code works I just need to know how to get it to show last 12 months excluding current month

Channa
Specialist III
Specialist III

=Sum({$<[Ship Date]={">=$(=MonthStart(Today(),-12))<$(=monthend(Today(),-1))"}>}Sales)

 

it will exclude current month

Channa
Pomna
Creator III
Creator III
Author

I know your code will give 12 months excluding current month. My issue is how to fit that in to my code. 

 

Channa
Specialist III
Specialist III

=Count({$<[Status Name]=-{'Closed','DONE'},[Date Created]={">=$(=MonthStart(Today(),-12))<$(=monthend(Today(),-1))"}>} distinct [Issue ID])

 

u can try this i really dont understand why you are using two dates in your expression

Channa
Pomna
Creator III
Creator III
Author

Thanks but my problem is just to get 12 months excluding current month. Your code gives 12 months but it does not exclude current month and does not give me the right numbers. Like I said, my code works I would appreciate it if there was a way to get it to return rolling 12 months excluding current month