Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
nihhalmca
Specialist II
Specialist II

Show single record while table has duplicates

Hi All -

I want to show highest premium for each policy  (single record).

For instance:

PolicyNo, CoverageDesc, Premium

1, A, 1000

2, B, 2000

3, C, 3000

Expected output is 

PolicyNo, CoverageDesc, Premium

3, C, 3000

How can i achieve this result?

I tried one approach : "Agg(Max(Premium),PolicyNo,CoverageDesc)"

Result:

PolicyNo, CoverageDesc, Premium

1, A, -

2, B, -

3, C, 3000

 

Thanks,

Nihhal.

Labels (1)
1 Reply
Brett_Bleess
Former Employee
Former Employee

Have a read through the following Design Blog post, I believe that may be what you need:

https://community.qlik.com/t5/Qlik-Design-Blog/The-sortable-Aggr-function-is-finally-here/ba-p/14702...

The only other means would be to use Order by or Group by in the load to get things in order and then grab the first or last record etc. that way, there are some other posts on Community regarding that scenario you should be able to find.

Regards,
Brett

To help users find verified answers, please do not forget to use the "Accept as Solution" button on any post(s) that helped you resolve your problem or question.
I now work a compressed schedule, Tuesday, Wednesday and Thursday, so those will be the days I will reply to any follow-up posts.