Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Learn how to migrate to Qlik Cloud Analytics™: On-Demand Briefing!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Rank Function Ignoring Calculated Dimension

QV Guru's

I've exhausted all of my resources trying to figure out this one. See below and attached .qvw. I'm using a calculated dimension in my pivot table to give me the Top 5 of QuantityA and bucket the rest in an "Others" row. This works fine, and when I do a simple RANK on QuantityA everything if fine.

But what if I wanted to include a RANK of QuantityB? I thought it would be simple enough, using set expression or the ALL operator on the RANK function I could IGNORE the calculated dimension and rank QuantityB numbers based on all Products. It seems as though I've tried every combination of set expressions and ALL operators and I still can't get it to work.

For example, the Product "Soundcard" should be ranked 12 not 6 (12th out of ALL Products not just the calculated dimension set).

Any suggestions would be greatly appreciated!

error loading image

1 Solution

Accepted Solutions
matt_crowther
Specialist
Specialist

We're off-piste with that question - 'ignoring but not ignoring' from within a table fundamentally goes against Qv's assocative logic so I can't see a better solution in the front-end that gets 'closer' than your existing calcuation.

Therefore I've come at it from a different angle and calculated the rank in the load script - file attached.

Hope that helps,

Matt - Visual Analytics Ltd

View solution in original post

2 Replies
matt_crowther
Specialist
Specialist

We're off-piste with that question - 'ignoring but not ignoring' from within a table fundamentally goes against Qv's assocative logic so I can't see a better solution in the front-end that gets 'closer' than your existing calcuation.

Therefore I've come at it from a different angle and calculated the rank in the load script - file attached.

Hope that helps,

Matt - Visual Analytics Ltd

Not applicable
Author

Matt thanks a ton. So unfortunetely I can't do this in the object but like you said I can do it in the load script, which isn't as nice but it will work. Actually I'm a little happy that's it not possible in the chart object using set analysis or TOTAL operator as I spent so long trying to get it to work ths route I would feel dumb if there was an easy solution 🙂

Thanks again