Skip to main content
Announcements
See why Qlik was named a Leader in the 2024 Gartner® Magic Quadrant™ for Data Integration Tools for the ninth year in a row: Get the report
cancel
Showing results for 
Search instead for 
Did you mean: 
cmorri1988
Creator
Creator

Rank Issue

Hi,

I am having issues ranking the below, with the attached table image and application for the BINDING DIFFERENCE measure.....

Applying rank() ranks the resulting number as 1 for all results within the table.

Only({1<ID = p({<Genre =  (p(Genre)), [Sub Genre] = (p([Sub Genre])),

Literal3 = (p(Literal3)),

[Price] = {">=$(vMinCTPrice)<=$(vMaxCTPrice)"},

[Pub Date Num] = {">=$(vMinCTPubDate)<=$(vMaxCTPubDate)"},

ID = e(ID),Author = , Title =, ISBN =>})>}-Binding_Prioritisation

+

Sum({$<Genre = (p(Genre)) , [Sub Genre] = (p([Sub Genre])), Literal3 = (p(Literal3))>}TOTAL Binding_Prioritisation))

Any help would be greatly appreciated.

Thank you!

6 Replies
sunny_talwar

Have you tried different mode and fmt for Rank?

Rank - chart function ‒ Qlik Sense

Capture.PNG

sunny_talwar

May be this

Num(Rank(TOTAL Only({1<ID = p({<Genre =  (p(Genre)), [Sub Genre] = (p([Sub Genre])),

Literal3 = (p(Literal3)),

[Price] = {">=$(vMinCTPrice)<=$(vMaxCTPrice)"},

[Pub Date Num] = {">=$(vMinCTPubDate)<=$(vMaxCTPubDate)"},

ID = e(ID),Author = , Title =, ISBN =>})>}-Binding_Prioritisation

+

Sum({$<Genre = (p(Genre)) , [Sub Genre] = (p([Sub Genre])), Literal3 = (p(Literal3))>}TOTAL Binding_Prioritisation)), 4))

cmorri1988
Creator
Creator
Author

Thanks!

Seems to rank by smallest SELECTED ISBN BINDING so far, and not the difference.

Thanks again

cmorri1988
Creator
Creator
Author

Does anyone have any ideas on how to rank the oiginal expression?

Thanks in Advance

cmorri1988
Creator
Creator
Author

Hi Sunny, I just had to make the difference a positive, and your ranking suggestion worked, thanks again!!

=Num(Rank(TOTAL (fabs(Only({1<ID = p({<Genre =  (p(Genre)), [Sub Genre] = (p([Sub Genre])),

Literal3 = (p(Literal3)),

[Price] = {">=$(vMinCTPrice)<=$(vMaxCTPrice)"},

[Pub Date Num] = {">=$(vMinCTPubDate)<=$(vMaxCTPubDate)"},

ID = e(ID),Author = , Title =, ISBN =>})>}-Binding_Prioritisation

+

Sum({$<Genre = (p(Genre)) , [Sub Genre] = (p([Sub Genre])), Literal3 = (p(Literal3))>}TOTAL Binding_Prioritisation)))), 4))

sunny_talwar

That is super