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

Announcements
We are aware of an issue with the Product Downloads page and looking into it.
cancel
Showing results for 
Search instead for 
Did you mean: 
manpri7078
Creator
Creator

FirstSortedValue Function Problem

Hi all,

In my QVW there is a table with two columns namely Ground and Capacity. I want to display the name of the ground with the maximum capacity in a text object using firstsortedvalue function. I am using the below mentioned function :

=Firstsortedvalue(Ground,Capacity).

I want to know what is wrong in this Expression. As per my view, it should work properly.

Please guide me.

Regards,

MANISH PRASAD

Labels (1)
6 Replies
Not applicable

Please try :

=Firstsortedvalue(Ground,-Capacity)


Thanks

MK_QSL
MVP
MVP

will give you Ground for Min Capacity...

=Firstsortedvalue(Ground,Capacity).


For Max Capacity... use -Capacity

=Firstsortedvalue(Ground,-Capacity).


MK_QSL
MVP
MVP

Another options...

=Aggr(IF(Capacity = Max(TOTAL Capacity), Ground),Ground)

er_mohit
Master II
Master II

Try this

Firstsortedvalue(Ground,-Capacity)

if your capacity field haave some aggregation on particular field then try this

Firstsortedvalue(Ground,-aggr(Capacity,aggrfieldname)

here in both - sign indicate to max ground name on basis of capacity

its_anandrjs
Champion III
Champion III

There is no error in the script of firstsorted

Eg:-

=Firstsortedvalue(Ground,Capacity) >> will give you min value

=Firstsortedvalue(Ground,-Capacity) >>will give you max value

You can also use minstring and maxstring

=MinString(Capacity) for minimum

=MaxString(Capacity) for maximum

Not applicable

YOU CAN USE

FIRST SORTED VALUE(GROUND,-CAPACITY)