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

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Summing only Max Values in set Analysis

Morning all.

I have a Set Analysis that works well when I filter the table as we only want to show the Max value for a certain Division or Site, My client now wants to include multiple Division's and want's to Sum all the max values I have tried

=SUM(aggr(MAX({$<

  [Activity Conversion Key]  ={'FloorArea'}

  ,[Activity Period Year]={$(vYearFilter)}

  >

  }

  num([Activity Value],'#,##0.000'))

But it does not work.

I have attached an excel of the data

Labels (1)
1 Solution

Accepted Solutions
sunny_talwar
MVP
MVP

May be try like this:

=Sum(Aggr(Max({$<[Activity Conversion Key]  = {'FloorArea'}, [Activity Period Year]={$(vYearFilter)}>} [Activity Value]), Year, Division, $(='[' & GetCurrentField(CycleGroupName) & ']')))

Where you have two dimensions in your chart -> Year and Cycle Group

View solution in original post

4 Replies
sunny_talwar
MVP
MVP

What are the chart dimensions where you are planning to use this expression?

Not applicable
Author

The chart Dimension is year. It's going into a Bar chart with a Cyclic Group.

sunny_talwar
MVP
MVP

May be try like this:

=Sum(Aggr(Max({$<[Activity Conversion Key]  = {'FloorArea'}, [Activity Period Year]={$(vYearFilter)}>} [Activity Value]), Year, Division, $(='[' & GetCurrentField(CycleGroupName) & ']')))

Where you have two dimensions in your chart -> Year and Cycle Group

Not applicable
Author

Excellent. Thank you Sunny works a treat.