Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Attend QlikWorld 2020 and hear keynote speaker, Malcolm Gladwell. $300 savings extended to February 9th Learn More
New Contributor II

FirstSortedValue and Max functions


I have a requirement to replicate a straight table as individual text boxes as shown in screenshot below. I am using Max and First Sorted Value expressions (Expressions pasted below). Somehow these functions only consider distinct values. In my example "68" is repeated twice but Max function only considers it once and first sorted value ignore completely. How do I resolve this?

Expressions I am using:

max(Aggr(XXX,Dimension),1) ---->1,2,3,....7

FirstSortedValue(Dimension,-(Aggr(XXX,Dimension)),1) ---->1,2,3,....7

2 Replies
MVP & Luminary
MVP & Luminary

Re: FirstSortedValue and Max functions

You need to make the max value unique somehow. Perhaps this will do:


talk is cheap, supply exceeds demand

Re: FirstSortedValue and Max functions

Try something like

FirstSortedValue(Dimension,-(Aggr(XXX+FieldIndex('Dimension',Dimension)/1000 ,Dimension)),1) ---->1,2,3,....7

FirstSortedValue(Aggr(XXX,Dimension),-(Aggr(XXX+FieldIndex('Dimension',Dimension)/1000 ,Dimension)),1)