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

Max, sum aggregate

Hi All,

I have a database with Area, Client No., Date & Value. A client can appear several times in the database.I would like to sum up all the Max(values) and display the data with Area as the dimension; effectively QlikView will be summing up the largest number at client level. I can't use the lastsortvalue because I have more than one transaction per day per client in some instances.

Thank you

H

Labels (1)
1 Solution

Accepted Solutions
Not applicable
Author

Thanks for the reply Prem,

I have decided to create a separate "value" mini table, as I don't want to drop the original table because the data as it was was perfect for other bits of analysis. Into the new table I pulled in distinct Client No and then Max(Value) grouped by ClientNo.

Many Thanks

H

View solution in original post

3 Replies
preminqlik
Specialist II
Specialist II

noconcatenate

FINAL:

Load Area,

clientNo,

Date,

max(value)               as                    maxValue

resident orginal group by

Area,

clientNo,

Date;

drop table orginal;

>>in front end take Chart>dimension Area >> exp as  sum(maxValue)

anbu1984
Master III
Master III

Select

  Area,

  ClientNo,

  Sum(Max(Value))

From Table

Group by

  Area,

  ClientNo

Not applicable
Author

Thanks for the reply Prem,

I have decided to create a separate "value" mini table, as I don't want to drop the original table because the data as it was was perfect for other bits of analysis. Into the new table I pulled in distinct Client No and then Max(Value) grouped by ClientNo.

Many Thanks

H