Qlik Community

QlikView Creating Analytics

Discussion Board for collaboration related to Creating Analytics for QlikView.

Announcements
Coming your way, the Qlik Data Revolution Virtual Summit. October 27-29. REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Contributor
Contributor

Max date and corresponding measure for same set analysis

Hi All

I have dimension and multiple dates with measure corresponding to them. 

Need to calculate average in straight table . But should consider only latest measure based on date.  Sample data and expected output given below.

Application_NameDateMeasure
App11-Jul-191
App12-Jul-191
App13-Jul-191
App210-Oct-181
App21-Jan-191
App34-Jan-190
App45-Jan-194-Mar
   
Expected Answer   
Application_NameDateAvg Measure
  75%
App13-Jul-19100%
App21-Jan-19100%
App34-Jan-190%
App44-Jan-19100%
Labels (2)
1 Reply
Highlighted

Hi, this result can be done in a table with Application_Name and Date as dimension and this expression:

Avg(Aggr(If(Date=Max(TOTAL<Application_Name> Date), Measure)
, Application_Name, Date))

 

Maybe you need to uncheck 'supress zero values' and use a calculated dimension to keep only the rows you want:

=Aggr(If(Date=Max(TOTAL<Application_Name> Date), Date), Application_Name, Date)