Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
¡Hey!
I would like use this code in an expression. Which are the functions? There are a "FOR" or "WHILE"?
This code is Java.
Codigo |
---|
int A[] = {20,10,50,70}; int Aux= 0; for(int i=0; i < A.length-1; i++) { System.out.println(" EMP: "+i+" "+A); for(int j = 0; j < A.length-i-1 ; j++) { System.out.println("J: "+j+" "+A f(A[j+1] < A { Aux = A[j+1]; A[j+1] = A A } } } |
Maybe you would be able to use something like:
pick(match(rangemax(sum(V1), sum(V2), sum(V3)), sum(V1), sum(V2), sum(V3)), 'V1', 'V2', 'V3')
Replace V1, V2, ... with your pictures.
Just be careful when you have 2 sums that are the max, will pick the first one in list.
Just to clarify, V1, V2, ... are separate fields right?
Hope this helps!
Why re-engineer QlikView?
Create a field that contains the data you want to sort on, and use this as the sort field in your charts.
Because the information is in multiple columns and the idea is to create a "text object" dynamic with the photo of the seller who sold more in this city. The objective is to determine the first, second and third place for each city. I'm doing it with "IF" but it is very slow.
V1 V2 V3 ... Vn
USA 5 3 1 ...
U.K. 1 2 2 ...
Mex 7 0 9 ...
...
Country_n
use concat() function
there is an argument to sort the field you want to display
Fabrice
Can you post your current expression?
Perhaps you may use also FirstSortedValue()
There is an argument to take the nth value
If you have only 3 texts to display, you can use this function for the 1st one & this function for the second one ....
Fabrice
This is my idea. However, this is only 3 columns and easy. But it is not the same with 10 columns. For the "text object" information is dynamic.
I'll try. Thanks for the tip.
Oh no
As Colin said, do not re-engeneer QlikView: use in-built function that do the sort for you, that will take the top 3 etc.
If you want to display images, you can do
1) load into a field the path to the images
2) display this field as an image (not text). You have this possibility into the table or the text box
Fabrice
OK. I thought that I could make a little more simple. I think my code is very big with "IF" lol