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

6 month trend with a line chart

Hello,

I have a list of Fire Ext. types that pass or fail inspections daily and I want to show the trend from the last 6 months. So I want to be able to select a month of Jan 2017 and show that month and the last 6 months of that type if it passed or failed.

I'm not really sure how to do this.

Thank you!

8 Replies
Not applicable

Hello Elizabeth

Just to understand your question… you want to select a Date (Ex: Jan-2017) and you want the graph to show information from August to January?.. six months back from the date you choose?

Regards

Diego

Not applicable

Another question... are you using Qlik Sense Desktop or Qlik Sense Server?

Regards

Diego

hammermill21
Creator III
Creator III
Author

Hey Diego!

Yes, I want to be able to pick the Month and FireX type and get six months back from the date I choose.

And I am using Qlik Sense Server.

brunobertels
Master
Master

Hi Elisabeth

regarding your post if you are talking about a six month trend and take as example january 2017 , i guess you have a MonthYear dimension in your chart and a Date field in your data set.

Here i guees you have a field called TEST with possible value 'Pass' and 'Fail'

So to count the last six month number of test Pass :

Count({$<TEST={'Pass'},Date=({$<={">=$(=Addmonth(Max(Date),-5))<=$(=Max(Date))"}>}Date)>}TEST)


So to count the last six month number of test Fail :

Count({$<TEST={'Fail'},Date=({$<={">=$(=Addmonth(Max(Date),-5))<=$(=Max(Date))"}>}Date)>}TEST)



hammermill21
Creator III
Creator III
Author

Hey Bruno,

Thanks for your reply! It's not working 100% but I'm going to try a few other things to see what happens.

brunobertels
Master
Master

Hi

Does it works now ? What was wrong ?

Bruno

hammermill21
Creator III
Creator III
Author

Hey Bruno!

Sorry for not getting back to you. I worked around it because that was not working, I'm making a few changes in the script which I think was affecting my calculations.

Thank you so much for your help though!!

Anonymous
Not applicable

Maybe it is helpfull;

=Count({<Year=,[Year Month]=,Month=,Date={">$(=MonthEnd(AddMonths(Date(Max(Date)),-6)))<=$(=MonthEnd(Max(Date)))"}>} Test)