Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Finding values in one field, which is associated to maximum value of another

Below is the Data:

 

ContactLocationCalls
ConA2
ConB1
Con1A1
Con1B1
Con2B2

I want number of calls per contact based on minstring of location'.

Output:

 

ContactLocationCalls
ConA2
Con1A1
Con2B2
Labels (1)
1 Solution

Accepted Solutions
rubenmarin

Hi Ramesh, if you have a table with Contact and Location as dimension, you can ause this expression:

If(Location=MinString(TOTAL <Contact> Location), Calls)

Check 'Supress zero values'

View solution in original post

3 Replies
rubenmarin

Hi Ramesh, if you have a table with Contact and Location as dimension, you can ause this expression:

If(Location=MinString(TOTAL <Contact> Location), Calls)

Check 'Supress zero values'

sunny_talwar

Try this script:

Table:

LOAD Contact,

    Location,

    Calls

FROM

[https://community.qlik.com/thread/165913]

(html, codepage is 1252, embedded labels, table is @1);

Right Join(Table)

LOAD Contact,

  Max(Calls) as Calls

Resident Table

Group By Contact;

Not applicable
Author

Hi Ruben,

Thanks for the response, With Contact and Location as dimension, we can achieve same with below expression:

if( Location=MinString( aggr(MinString(Location), Contact)), sum(Calls))

-Regards

Ramesh