Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
deniscamh
Creator
Creator

Average calculation based on Max value

Hello all,

My data looks like this:

Load * Inline [

Employee, Date, Date_Hired, Year,Years_Of_Service

1,4/30/2017,4/18/2016, 2017,1.032

1,5/30/2017,4/18/2016, 2017,1.14

2,4/30/2017,7/25/2011, 2017,5.77

2,5/30/2017,7/25/2011, 2017,5.84];

What I am trying to create is a chart with time frames - Years, Quarter, Month, which calculates average Years_Of_Service per employee. So for year 2017 the calculation will be (1.14 + 5.84)/2.

I tried something like this: AVG(Agr(Max(Years_Of_Service),Employee)) but it does not work properly.

I know I am missing something small but cannot figure it out.

Please help.

Thanks

Denis

15 Replies
deniscamh
Creator
Creator
Author

Yes I tired the $(='[' & GetObjectDimension() & ']' on Bar chart, thank you for clarifying. But it does not work. I will try to play with it later.

Regarding to the  Dimensionality I was hoping to avoid that.

Thanks anyway.

 

sunny_talwar

Oh, you know what... GetObjectDimension() was recently added to Qlik Sense. Are you using an older version of Qlik Sense? Older than September 2017?

Qlik Sense September 2017 November 2017 Releases

deniscamh
Creator
Creator
Author

No I am using Sep 2018 version now.

sunny_talwar

No idea my friend. I wish I had the option to post the qvf where it is working for me.
deniscamh
Creator
Creator
Author

That is ok I will try to figure out.

may be I am doing something wrong.

Thanks for your help.

sunny_talwar

Sounds good. All the best for your project!!