Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
how does the hrank works???
thanks.
Hi
First, it only works in Pivot tables, which is I suppose obvious when you know what it does.
A pivot obviously takes one expression and can create many columns according to the dimension you use (date for example) and the HRank function gives you a ranking of the current cell within the row of the same expression.
Consider the following:
You have country as the vertical pivot dimension.
You have month as the horizontal pivot dimension.
You have Sum(Sales) as one Expression
You have Sum(Cost) as another expression
Your pivot is therefore showing sales and cost by month across the screen and by country down the screen.
If you now add another expression such as HRank(Sum(Sales)) then that will give you the ranking of that months sales, the parameters are the same as those for Rank so you can get the results customised to what you want to see.
EG (in one Row): Jan=1000, Feb=2000, Mar=1500, Apr=3000, May=6000, Jun=500
HRank(Sum(Sales)) for each of the above would give you: May=1, Apr=2, Feb=3, Mar=4, Jan=5, Jun=6
Hope this helps,
Hi
First, it only works in Pivot tables, which is I suppose obvious when you know what it does.
A pivot obviously takes one expression and can create many columns according to the dimension you use (date for example) and the HRank function gives you a ranking of the current cell within the row of the same expression.
Consider the following:
You have country as the vertical pivot dimension.
You have month as the horizontal pivot dimension.
You have Sum(Sales) as one Expression
You have Sum(Cost) as another expression
Your pivot is therefore showing sales and cost by month across the screen and by country down the screen.
If you now add another expression such as HRank(Sum(Sales)) then that will give you the ranking of that months sales, the parameters are the same as those for Rank so you can get the results customised to what you want to see.
EG (in one Row): Jan=1000, Feb=2000, Mar=1500, Apr=3000, May=6000, Jun=500
HRank(Sum(Sales)) for each of the above would give you: May=1, Apr=2, Feb=3, Mar=4, Jan=5, Jun=6
Hope this helps,