Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Good morning! I'm hoping someone can help. I have an app with a table with a couple of dimensions and a number of measures calculating ranking positions for various categories. The issue I'm having is that some rows have null values for certain categories as they didn't have a score, however, as the ranking measure is set to sort from smallest to largest, it's picking up the null value and ranking it as 1. I've amended the script to basically check the value is greater than 0, and whilst this does remove the ranking for the null value, the rest of the ranking still begins at 2 rather than 1.
Does anyone have any idea if its possible to force the ranking to begin at 1? I've included the measure code below. For context, I've written it this way as the overall results were ranking via pivot in Excel prior to loading into QlikSense, and the QlikSense app is essentially designed to rank the overall ranking positions as we have a business need to filter the rankings by institution group. Thus, we are able to display an accurate ranking for overall, a re-calculated ranking the selected institution group (e.g. competitor).
=if(sum([Teaching Ranking])>0,aggr(rank(-sum([Teaching Ranking])),Institution))
Any help is most appreciated.
Matt
Hello Matt
You can try this to see if solves.
=if(sum([Teaching Ranking])>0, aggr(rank(-sum([Teaching Ranking])) + 1, Institution))
Thanks Rui. Your suggestion was very helpful. I just had to change the +1 to a -1.
=if(sum([Teaching Ranking])>0, aggr(rank(-sum([Teaching Ranking])) - 1, Institution))
Cheers,
Matt
Right so it turns out the validation step is forcing each ranking to have -1 taken from it, even where it genuinely starts at 1. I'll have to review this again.