Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
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
Luminary Alumni
Luminary Alumni

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
Luminary Alumni
Luminary Alumni

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
Luminary Alumni
Luminary Alumni

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.