Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
QSense
Creator II
Creator II

Expression in chart

Hi,

I have an expression below.

=avg ({$<TipDetay= {'Hizmet noktası'} >}Availability)

But I want to show last six months value of above expression

Sum({<[Rapor Tarihi]={'>=$(=MonthStart(Max([Rapor Tarihi]), -5))<=$(=MonthEnd(Max([Rapor Tarihi])))'},[Arıza Rapor Yılı]=>} [Karşılanan Çağrı Oranı]) -->

İn this expression as I understood The field '[Karşılanan Çağrı Oranı] ' will be replaced by 'Availability' field.

But it doesnt work.

Sincerely regards,

1 Solution

Accepted Solutions
jagan
Partner - Champion III
Partner - Champion III

Hi,

This expression works, check whether you have data for all the six months.  If you have any month/year fields exclude the selection by using the YearFieldName=, MonthFieldName=.  Try below expression

=avg ({$<YearFieldName=, MonthFieldName= [Rapor Tarihi]={'>=$(=MonthStart(Max([Rapor Tarihi]), -5))<=$(=MonthEnd(Max([Rapor Tarihi])))'}, TipDetay= {'Hizmet noktası'} >}Availability)

Regards.

Jagan.

View solution in original post

3 Replies
jagan
Partner - Champion III
Partner - Champion III

Hi,

You can use this expression for finding the last six months average

=avg ({$<[Rapor Tarihi]={'>=$(=MonthStart(Max([Rapor Tarihi]), -5))<=$(=MonthEnd(Max([Rapor Tarihi])))'}, TipDetay= {'Hizmet noktası'} >}Availability)

Hope this helps you.

Regards,

Jagan.

QSense
Creator II
Creator II
Author

It didnt work for six months

in attached file as you see 4 months value is shown 6months.png

jagan
Partner - Champion III
Partner - Champion III

Hi,

This expression works, check whether you have data for all the six months.  If you have any month/year fields exclude the selection by using the YearFieldName=, MonthFieldName=.  Try below expression

=avg ({$<YearFieldName=, MonthFieldName= [Rapor Tarihi]={'>=$(=MonthStart(Max([Rapor Tarihi]), -5))<=$(=MonthEnd(Max([Rapor Tarihi])))'}, TipDetay= {'Hizmet noktası'} >}Availability)

Regards.

Jagan.