Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I'm using QlikView 10 and can't get the HRank expression to work. I've attached a view of the column headings which shows the expressions I'm using. I'm using a pivot table, but the only result that I get with the HRank expression is a dash. What am I doing incorrectly?
Ah, I see. Sorry, I just assumed since hrank() is used comparatively less frequently than rank().
Back to your question, that's not what function hrank() does. Hrank() is used in pivot table to rank when a dimension has been pivoted across the top. It ranks horizontally, but only within the same pivoted dimension. In your case, you will need to create the expression manually, using IF statements. For example: if(column(1)>column(3),1,2)
In your case, this will be more complex since you have multiple expressions.
Regards,
Vlad
Are you sure you want hrank and not a regular rank() function? Try using rank(sum([6 Benefits]),4,1)
Regards,
Vlad
Yes, I do want to rank the rows (horizontal) versus the columns. In my example, I'm expecting the rank to be 2 and then 1 per row. (In reality, I have more columns to rank instead of just two.) I can't understand why my expressions can rank vertically but not horizontally (all I get are null values). Any other suggestions?
Ah, I see. Sorry, I just assumed since hrank() is used comparatively less frequently than rank().
Back to your question, that's not what function hrank() does. Hrank() is used in pivot table to rank when a dimension has been pivoted across the top. It ranks horizontally, but only within the same pivoted dimension. In your case, you will need to create the expression manually, using IF statements. For example: if(column(1)>column(3),1,2)
In your case, this will be more complex since you have multiple expressions.
Regards,
Vlad
Another option is something like the attached.
Regards,
Vlad
Vlad, thanks so much for your response. Unfortunately, I'm using the personal edition of QlikView so I cannot see your recent attachment. Regardless, I appreciate your help!
Basically, the attachment has a calculated dimension something like this: valuelist('Expression 1','Expression 2') which was pivoted across the top. And 2 expressions:
Value
pick(match(valuelist('Expression 1','Expression 2'),'Expression 1','Expression 2'),
sum(Exp1),
sum(Exp2)
)
Rank
hrank(Value)