Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
JMAROUF
Creator II
Creator II

Show only last four ranked values

Hi everyone,

I have a straight table in which I must show only the last four ranked values by TVPI, it works well when I put the TVPI measure as the first column, however it upsets the order when I put the DPI measure as the first one, can anyone help please?

Input:

Table:
LOAD
*
Inline [
Fund, tvpi, date,dpi,Millesime
F1,0.2, 31/12/2022,0.1, 2012
F1,0.1, 30/06/2022,0.2, 2012
F2,0.4, 31/12/2022,0.3, 2023
F2,0.3, 01/01/2023,0.4, 2023
F3,0.5, 31/12/2022,0.5, 2004
F3,0.6, 01/01/2023,0.6, 2004
F4,4.5, 31/12/2022,4.5, 2002
F5,5.5, 31/12/2022,5.5, 2014
F6,6.5, 31/12/2022,6.5, 2003
F7,7.5, 31/12/2022,7.5, 2000
F8,8.5, 31/12/2022,8.5, 2001
F9,9.5, 31/12/2022,9.5, 2001
F10,10.5,31/12/2022,10.5,2001
F11,11.5,31/12/2022,12.5,2014
F12,0.25,31/12/2022,11.5,2013
F13,0.2,31/12/2022,13.5,2001
];

Output with TVPI as first column (desired order):

JMAROUF_2-1680799352850.png

Output with TVPI as second column :

JMAROUF_3-1680799433718.png

 

Here is my expression wich I have putted in both expression and sort:

=FirstSortedValue(tvpi,-date)

 

Labels (1)
4 Replies
Sabrina_V
Partner - Creator II
Partner - Creator II

When you added the two measures, did you change the order of the columns on the sort menu ?

JMAROUF
Creator II
Creator II
Author

Of course:

 

JMAROUF_0-1680854197546.png

 

Sabrina_V
Partner - Creator II
Partner - Creator II

And you put sort by expression on all of the columns ?

JMAROUF
Creator II
Creator II
Author

I have just one dimension (Fund) and it's set to sort by expression

JMAROUF_0-1680858893470.png