Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
rishimessi19
Contributor II
Contributor II

FirstSortedValue and Max functions

Hi

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
Gysbert_Wassenaar

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


FirstSortedValue(Dimension,-(Aggr(XXX*1000+Ord(Left(Dimension,1)),Dimension)),1)


talk is cheap, supply exceeds demand
swuehl
MVP
MVP

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)