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: 
Anonymous
Not applicable

Unable to find the Maximum value in a string

I have data similar like this.

ParentChildAmount
AA.110
AA.212
AA.313
AA.414
AA.1115
AA.1316
AA.3217
AA.3318
BB.12
BB.23
BB.34
BB.215

My requirement states that I have to show only these rows when a button is clicked. How can i achieve this.

I have tried  MaxString, Aggr functions but dint help. Please advice.

Thanks,

SP

1 Solution

Accepted Solutions
sunny_talwar

May be this

=If(vVar = 1, Child, Aggr(If(SubField(Child, '.', 2) = Max(TOTAL <Parent> SubField(Child, '.', 2)), Child), Child, Parent))

View solution in original post

6 Replies
sunny_talwar

What object are you using here?

Anonymous
Not applicable
Author

Pivot Table, and there are couple of Expressions associated with the output of max value.

sunny_talwar

Is Child one of the dimension? If it is.. then may be like this

If(vVar = 1, Child, Aggr(If(Child = MaxString(TOTAL <Parent> Child), Child), Child, Parent))

Here vVar is based off of the button and make sure to check 'Suppress When Value is Null' on the dimensions tab of the chart properties

Anonymous
Not applicable
Author

I tried already this earlier but the problem with this expression is the Output will give A.4, because logically A.4 is greater than A.33.

sunny_talwar

May be this

=If(vVar = 1, Child, Aggr(If(SubField(Child, '.', 2) = Max(TOTAL <Parent> SubField(Child, '.', 2)), Child), Child, Parent))

Anonymous
Not applicable
Author

I think this should work. Let me test and get back to you!! Thanks