Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
seahyanzheng
Contributor III
Contributor III

max sum

I have a dimension Step and expression - Unique Customer (sum([Customer Count])). i want to create max of Unique Customer but unable to do so with max(sum([Customer Count])). How do i get the results as shown below?


Customer CNT.PNG

1 Solution

Accepted Solutions
pradosh_thakur
Master II
Master II

or with suppress null

Max(TOTAL Aggr(Sum({< Step_Nnull ={"*"}>}[Customer Count]), Step_Nnull))


as expression

Learning never stops.

View solution in original post

16 Replies
el_aprendiz111
Specialist
Specialist

Hi,

1 exmpl

max(total aggr(Count(Customer),Customer ))

sunny_talwar

I think it would be like this

Max(TOTAL Aggr(Sum([Customer Count]), Step))

seahyanzheng
Contributor III
Contributor III
Author

I got the total of all customer count instead of the maximum though..

Customer CNT.PNG

seahyanzheng
Contributor III
Contributor III
Author

I will like to get max([Unique Customer]). but QV is throwing error - bad field name(s) for Unique customer as it is a label

sunny_talwar

Would you be able to post screenshots without label names and extended columns so that I can see what expressions you are using? Also, Step is the only dimension in this chart? or are there more then that?

seahyanzheng
Contributor III
Contributor III
Author

Hi Sunny,

Sure. Below is the screenshot excluding label. Also, Step is the only dimension in this chart and i did suppress when it is null value. Third column will be Max(TOTAL Aggr(Sum([Customer Count]), Step_Nnull))

Thanks for your help.

Customer CNT.PNG

sunny_talwar

Can you add another expression and share a screenshot (Max without total)

Max(Aggr(Sum([Customer Count]), Step_Nnull))

seahyanzheng
Contributor III
Contributor III
Author

Sure.

This is how it looks like:

Customer CNT.PNG

pradosh_thakur
Master II
Master II

Hi

i think it is showing the correct data. is there any null value in step_Nnull field. My guess is you have null and the Sum([Customer Count]) for that is 506,014,721



try to uncheck suppress null from dimension and use these expression. share the screenshot after that. null should not be suppressed.

Sum([Customer Count])

Max(TOTAL Aggr(Sum([Customer Count]), Step))



regards

Pradosh

Learning never stops.