Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Posting on Qlik Community is temporarily paused for some users. Thank you for patience and we'll update you soon!
cancel
Showing results for 
Search instead for 
Did you mean: 
apthansh
Creator
Creator

Sum with distinct ID

Looking for equivalent of below script in load script.Is it possible.

sum(aggr(sum(DISTINCT [Seats]), [key]))

Than you.

Labels (1)
3 Replies
its_anandrjs
Champion III
Champion III

This is


Load DISTINCT

[key],

Sum([Seats])

From Source

Group By [key];

its_anandrjs
Champion III
Champion III

You can give name to sum field as well

Load DISTINCT

[key],

Sum([Seats]) as SeatsSum

From Source

Group By [key];

dinuwanbr
Creator III
Creator III

Try This

Load

Key,

count(distinct [Seats]) as SeatsSum

from [Source]

group by Key;

Rgds,

Tharindu