Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Experts,
I have a question about ranking. In my qvw app, there is only one table, as below 'table data' shows.
I want to calculate the rank of each area in each month, like 'what i want table' shows.
How to edit this expression?
Attached please find my qvw file. Thanks
what i want table:
area | a | b | c | |||
month | v | rk | v | rk | v | rk |
1 | 6 | 3 | 8 | 2 | 10 | 1 |
2 | 7 | 1 | 4 | 3 | 6 | 2 |
table data:
month | area | sales |
1 | a | 6 |
1 | b | 8 |
1 | c | 10 |
1 | d | 8 |
1 | e | 1 |
1 | f | 9 |
1 | g | 9 |
1 | h | 10 |
2 | a | 7 |
2 | b | 4 |
2 | c | 6 |
2 | d | 5 |
2 | e | 6 |
2 | f | 2 |
2 | g | 7 |
2 | h | 7 |
hi
have a look at the attach example
all you need to do is use hrank function instead of rank
sorry, the correct table data is:
month | area | sales |
1 | a | 6 |
1 | b | 8 |
1 | c | 10 |
2 | a | 7 |
2 | b | 4 |
2 | c | 6 |
The only way I could do it was using month as the firs dimension and area as the second. The consequence was that the months became columns and the areas, rows:
Eduardo
hi
try to use Generic Load in script.
like
Generic LOAD month,
area,
sales
FROM
(ooxml, embedded labels, table is Sheet1);
see attachment, hope this helps you.
Thank you very much. But it's not what i want.
I can't do it because of the data model.
hi
have a look at the attach example
all you need to do is use hrank function instead of rank
As I see the change rank to hrank, which is offered by Liron Bra'amis working. Did you try it?
You're right. It worked for me in Zhou's qvw
Eduardo
Thank you very much. It's exactly what i want.