Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Talend Cloud AWS EU Scheduled Outage: Starting Tues 26 May 21:00 CEST with expected completion Wed 27 May 01:00 CEST
cancel
Showing results for 
Search instead for 
Did you mean: 
rohitians
Creator III
Creator III

Ranking according to highest sales problem..

Hello,

I have a pivot chart where in I have different companies and their different divisions with sales every month,

Sales=

sum(Values)/1000000

and i want their ranks according to the sales value

Rank=Rank(SUM({$<FiscalYear={$(=max(FiscalYear))}>} [Values])/10000000)

but I am not getting proper ranking.

Please help if any coreection required.

Thanks and Regards,

Rohit


Labels (1)
1 Solution

Accepted Solutions
rohitians
Creator III
Creator III
Author

Hello,

The expression is working properly,

but when i include month as dimension i am not getting proper rankings,

wen i select a particular month it works properly,

in the selection if i select suppose abc company and it has 200 products it shows ranking 1-200

instead of the rank which it has if no company is selected..

Thanks and Regards,

Rohit

I just ignored the Company selection in set analysis and it showed the static rank even when company was selected..i made following changes....

Rank=aggr(Rank(SUM({$<FiscalYear={$(=max(FiscalYear)),COMPANY=}>} [Values])/10000000),COMPANY)

View solution in original post

5 Replies
Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

Take a look at pivot table in the attached example. You may need to use an expression like in the last column.


talk is cheap, supply exceeds demand
gaurav2017
Creator II
Creator II

Hi,

Cheers Gysbert. I would have suggested the same solution.

Please close the issue as it has been answered correctly as desired. If there is any other thing you want to add up, please write it up.

Regards

rohitians
Creator III
Creator III
Author

Hello,

The expression is working properly,

but when i include month as dimension i am not getting proper rankings,

wen i select a particular month it works properly,

in the selection if i select suppose abc company and it has 200 products it shows ranking 1-200

instead of the rank which it has if no company is selected..

Thanks and Regards,

Rohit

israrkhan
Specialist II
Specialist II

Dear Gysbert,

i go through with your sample document, and i am confused at a point,

kindly explain me, in your third expression you used rank(total sum(total <Region,SalesPerson> Sales))

confusions: i think total keyword ignored the diminsions,right? first you ignored the dimension using total keyword and then you used the <Region, SalesPerson> to group by them. i think if you dont use total then it will group by Region, and SalesPerson as they are dimension.

what is the difference please explain..

Kind Regards

Khan

rohitians
Creator III
Creator III
Author

Hello,

The expression is working properly,

but when i include month as dimension i am not getting proper rankings,

wen i select a particular month it works properly,

in the selection if i select suppose abc company and it has 200 products it shows ranking 1-200

instead of the rank which it has if no company is selected..

Thanks and Regards,

Rohit

I just ignored the Company selection in set analysis and it showed the static rank even when company was selected..i made following changes....

Rank=aggr(Rank(SUM({$<FiscalYear={$(=max(FiscalYear)),COMPANY=}>} [Values])/10000000),COMPANY)