Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello all,
I am using the following expression: The dimension is a student name.
Num(count({<Ratings={'>=7'}>} Questions)/Count(Questions), '0.00%')
When two students have the same percentages, i.e., ranked 2, Qv puts one on top of the other. I wanted to add a column to show their ranks are the same. For example,
John - 99% - 1
Jo - 98.6% - 2
Joe - 98.6% - 3
I know I may have to use rowno() and rank() function but now sure how. Any help is appreciated.
Sorry friends,
I made an error in the previous post. I would like that extra ranked column to show
John - 99% - 1
Jo - 98.6% - 2
Joe - 98.6% - 2 (mentioned as 3 in the previous post)
Thanks,
May be try with AutoNumber()
LOAD Name,
Percentage,
AutoNumber(Percentage) as Ratings Rank
FROM Source
Hi,
Are you calculating the percentage in the script?
Hi Gabriel,
No, I am calculating in the Expression tab.
Thanks,
Karthik
I will suggest you move the calculation to script.
You can then use the Peek() function and RowNo() to Rank.
Moving the calculation to Script helps the App to perform better
Please post a sample data so that community can help with solution
Hi Gabriel,
Here is the attached qvw and sample data
Hi
use Rank function
Rank(COUNT({<Marks={'>=7'}>}GID)/Count(GID))
or
Rank(COUNT({<Marks={'>=7'}>}GID)/Count(GID), 1,1)
Hi,
I think you achieve your requirement in UI as well.
What I did is to add another calculation as below
=if(above(Num(COUNT({<Marks={'>=7'}>}GID)/Count(GID), '0.00%')) = Num(COUNT({<Marks={'>=7'}>}GID)/Count(GID), '0.00%'),RowNo(TOTAL) -1, RowNo(TOTAL))
Try it