Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi
i want to know to display first 5 countries data in list box with out using normal if (match()).
is there any alternate
You can try this in the load script
Ex:-
T1:
LOAD * Inline
[ Country
A
B
D
E
F
G
H ];
First5:
First 5
LOAD
Country,
Country as First5Country
Resident T1;
Note:- And then plot the First5Country field for the 5 country
Try like:
=If(Aggr(Rank(Country),Country)<6,Country)
Here, the ranking would be based on string sorting(alphabetical)
You can try this in the load script
Ex:-
T1:
LOAD * Inline
[ Country
A
B
D
E
F
G
H ];
First5:
First 5
LOAD
Country,
Country as First5Country
Resident T1;
Note:- And then plot the First5Country field for the 5 country
Considering you have country and sales data... you can achieve that by using below expression in list box
=IF(Aggr(Rank(SUM(Sales),4),Customer)<=5,Customer)
another one could be (but it depends on what's the meaning of first)
add an id in the load
load
....
autonumber(Country, 'Country') as idCountry
.....
and in the listbox use an expression
=if(idCountry<=5,Country,'Other')