Qlik Community

Ask a Question

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
Join this live chat April 6, 10AM EST - QlikView to Qlik Sense REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
ananyaghosh
Creator III
Creator III

How to get Rank based on Customer Name?

Hi,

I am using the below rank() function in my expression:

aggr(rank(sum({<FlagYTD={'YTD'}>}Sales)),[Customer Name]), but it does not work for me and gives only '-'.

I have attached my QVW file. Please help me.

8 Replies
prma7799
Master III
Master III

where is the attachment

tresesco
MVP
MVP

What is your expected output? If you are looking output in the chart, might try using NODISTINCT like:

aggr(NODISTINCT rank(sum({<FlagYTD={'YTD'}>}Sales)),[Customer Name])

sunny_talwar

I don't see the use of the above expression in the attached qvw file?

ananyaghosh
Creator III
Creator III
Author

Hi,

I have re-upload it. Please can you check?

sunny_talwar

Did tresesco‌'s suggestion not work for you? What is the expected output for the Cus Rnk column?

ananyaghosh
Creator III
Creator III
Author

Hi,

If you look at the first straight table with title 'Calculations - MTD,YTD,Current Sale' , then you can see that the column value for 'Customer YTD Rank ' has only 1 instead of showing rank. I don't understand what is the reason for it.

So if t has some reason please can u tell me what I have done wrong there?

sunny_talwar

You mentioned what you don't want to see, but I still don't know what you do want to see

ananyaghosh
Creator III
Creator III
Author

Hi,

Please check my attached QVW file.

If you look at the first straight table with title 'Calculations - MTD,YTD,Current Sale' , then you can see that the column value for 'Customer YTD Rank ' has only 1 instead of showing rank. I don't understand what is the reason for it.

So if t has some reason please can u tell me what I have done wrong there?

Thanks,

Sandip