Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
vikasmahajan

Rank Calculations

Dear All,

I have following expressions for  mat sales and monthly sales I want to calculate rank BRAND wise how

do I this can any one give idea ?

Mat Sales Expression

---------------------------------

(sum({$<FinancialYear=,MonthName=,Quarter=,FiscalYear={$(=max(FiscalYear)),$(=max(FiscalYear)-1)}

,Date={"<=$(=max(Date))>=$(=MonthStart(max(Date),-11))"}>}Values)

)/10000000

Monthly Sales Expression

-------------------------------------

SUM({$<FinancialYear=,MonthName=,FiscalYear = {$(=max(FiscalYear))},MonthNumber = {"<=$(=max({<FiscalYear={$(=max(FiscalYear))}>} MonthNumber))>$(=max({<FiscalYear={$(=max(FiscalYear))}>} MonthNumber)-1)"}>}Values

/10000000)

Thanks in advance.

Vikas

Hope this resolve your issue.
If the issue is solved please mark the answer with Accept as Solution & like it.
If you want to go quickly, go alone. If you want to go far, go together.
3 Replies
sushil353
Master II
Master II

Try this:

aggr(rank(

SUM({$<FinancialYear=,MonthName=,FiscalYear = {$(=max(FiscalYear))},MonthNumber = {"<=$(=max({<FiscalYear={$(=max(FiscalYear))}>} MonthNumber))>$(=max({<FiscalYear={$(=max(FiscalYear))}>} MonthNumber)-1)"}>}Values

/10000000)),BRAND)

HTH

Sushil

vikasmahajan
Author

Dear Sushil

Thanks for Reply this expression I applied already results means RANK coming wrong , I think qlikivew is considering zero or null values while calculating rank.

What could be a problem ?

Vikas

Hope this resolve your issue.
If the issue is solved please mark the answer with Accept as Solution & like it.
If you want to go quickly, go alone. If you want to go far, go together.
sushil353
Master II
Master II

could you please update a sample app and explain the output which u want