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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Get the value that has the max count - via script Load

Hi all,

I've attached an app sample.

I have a table with two columns.

I want, VIA SCRIPT LOAD, to get the "Value" that has the max count.

Example:

Value 5 - count = 3

Value 7 - count = 2

Value 9 - count = 1

I want to get the Value 5, which is the value with the max count.

But I want to get it in the load script.

How can I do this?

Thanks in advance.

Regards,

Sílvia Ganhão

1 Solution

Accepted Solutions
Clever_Anjos
Employee
Employee

t:

load

Value,

count(Name) as Qty

Resident TestTable

Group by Value;

t2:

load

FirstSortedValue(Value,-Qty) as MaxValue

Resident t;

View solution in original post

1 Reply
Clever_Anjos
Employee
Employee

t:

load

Value,

count(Name) as Qty

Resident TestTable

Group by Value;

t2:

load

FirstSortedValue(Value,-Qty) as MaxValue

Resident t;