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: 
Keitaru
Creator
Creator

First month of Rolling 12 month count not displaying correctly

Hi,

Having issues with Rolling 12 Months Count on my chart.

OriginalOriginal

1:0
2:1
3:12
4:6Rolling 12 MonthsRolling 12 Months

 For some odd reason my 1st month of the rolling 12 months' data is not coming out as compared to the original one above w/o the rolling 12 month 

Here is my code:

Count({<[Res.Severity]={4},[Res.Reported MY],[Res.Reported Date+]={">=$(=addmonths(today(1),-12))<=$(=today(1))"}>}[Res.Incident ID*+])

 

 

 

 

Labels (2)
6 Replies
sunny_talwar

Not sure I understand the issue? You have two different dimensions in the chart images that you have shared above? What is the issue. Can you explain more?

Keitaru
Creator
Creator
Author

Hi Sunny,

First Chart is the original Chart that I had created without rolling 12 Month formula, so its displaying Jan 2018 to Dec 2018 data numbers correctly. 

However, in the second chart after applying rolling 12 Months formula. From Jan 18 to Jan 2019, notice that both original Jan 2018 and Rolling 12 Mnths 2018 data are completely off.

So my question here is how do I rectify this in having both numbers match? as the rest of the Months seem to be in synced.

 

Thank you.

sunny_talwar

What are the expressions for the two charts? The one expression you shared have a set analysis on [Res.Severity] field to show just 4... why in the image we are seeing all 1, 2, 3, & 4? Are you sure you share the right expression?

Keitaru
Creator
Creator
Author

Where here is the code without the running 12 months but with a static 12 months.

  1. Count({<[Res.Severity]={1}>}[Res.Incident ID*+])
  2. Count({<[Res.Severity]={2}>}[Res.Incident ID*+])
  3. Count({<[Res.Severity]={3}>}[Res.Incident ID*+])
  4. Count({<[Res.Severity]={4}>}[Res.Incident ID*+])

here are the codes for running 12 months

  1. Count({<[Res.Severity]={1},[Res.Reported MY],[Res.Reported Date+]={">=$(=addmonths(today(1),-12))<=$(=today(1))"}>}[Res.Incident ID*+])
  2. Count({<[Res.Severity]={2},[Res.Reported MY],[Res.Reported Date+]={">=$(=addmonths(today(1),-12))<=$(=today(1))"}>}[Res.Incident ID*+])
  3. Count({<[Res.Severity]={3},[Res.Reported MY],[Res.Reported Date+]={">=$(=addmonths(today(1),-12))<=$(=today(1))"}>}[Res.Incident ID*+])
  4. Count({<[Res.Severity]={4},[Res.Reported MY],[Res.Reported Date+]={">=$(=addmonths(today(1),-12))<=$(=today(1))"}>}[Res.Incident ID*+])

Don't have a access to a sample qsf since i'm working on my companies Qlik Enterprise. 

 

sunny_talwar

Would you also be able to share the format for [Res.Reported Date+] field? May be you need this?

Count({<
[Res.Severity] = {1},
[Res.Reported MY],
[Res.Reported Date+] = {">=$(=Date(AddMonths(Today(1), -12), 'DateFieldFormatHere'))<=$(=Date(Today(1), 'DateFieldFormatHere'))"}
>} [Res.Incident ID*+])
Keitaru
Creator
Creator
Author

so i figured a work around for this and added the rolling 12 months calculation into dimension instead of the measure and it seem to work better for my requirements. 

 

the date time format has been changed from  dd\mm\yy hh:mm:ss down to just dd\mm\yy in the load script.