Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
rkpatelqlikview
Creator III
Creator III

how to show the Previous Rank in straight table.

Hi Experts,

Please help on this.

Below is my expression in in straight table for Rank.

=

Aggr(

rank(

(Round(sum({<[Safety Category]={'Green'}>} [Kms Travelled]) / sum([Kms Travelled]) *100)/4)

+(Round((COUNT(DISTINCT [DEVICE NO]) -COUNT([Device Number]))/COUNT(DISTINCT  [DEVICE NO]) *100 )/4 ) +

(Round(SUM({<controlled={'Yes'}>}Quantity)/SUM({<controlled={'Yes'}+{'No'}>}Quantity)*100)/4)

+

(Round(SUM({<[iVMS ( Y/N)]={'Yes'}>}Quantity)/SUM({< [iVMS ( Y/N)]={'Yes'}+{'No'}>}Quantity)*100)/4)+sum([Kms Travelled])/(1E10)

,4,1),Group, [Carrier Name])

If i select this month in other expression it should be Previous Rank..

Please let me know if you want more info.

42 Replies
sunny_talwar

Not sure I understand... can you pin point the exact issue? May be provide the exact number you are looking to get?

bc-thebruuu
Creator
Creator

Last Rank = count

Am I right?

Can yo provide an expected result?

rkpatelqlikview
Creator III
Creator III
Author

Sure Sunny / Bruno,

Please find the below 2 images. Here CarierName "Sainath Transporter" is Rank 1.

previousrank.PNG

Now i selected the month March then that "Sainath Transporter" is Rank is 7. This Rank it should show in Previous Rank column.

after.PNG

bc-thebruuu
Creator
Creator

Is previous wrt to previous selection or previous month?

sunny_talwar

Would you be able to share a sample where Jan have some data?

Capture.PNG

sunny_talwar

I believe previous month... so when March is selected, show Feb's Rank in Previous Rank

rkpatelqlikview
Creator III
Creator III
Author

Yes Exactly. Previous month

rkpatelqlikview
Creator III
Creator III
Author

sure

bc-thebruuu
Creator
Creator

Anyway ..

I think that Overall Rank should contain in each set analysis a constraint on

MonthYear to be  max possible month

and previous montth should be max possible month -1

rkpatelqlikview
Creator III
Creator III
Author

I need to write an expression for month.  There is Quarter and Year as well.