Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

paulyeo11
Valued Contributor II

How to compute Sales By Group Amount only for Top 3 customer ?

Hi

My Table 1 Expression display whole of last sales is correct :-

Money(

Sum({$<year = {$(=Max(year)-1)}, month = {"<=$(=Max({<year={$(=Max(year))}, sales = >} month))"}>}$(ColumnDim51)/$(Columndim89)/1000)

,$(vMoneyFormatK))

On the next column , i need to display only Top 3 customer sales amount , so i use the expression given by sunny as below :-

Sum(TOTAL {<$(ColumnDim101) = {"=Rank(Sum(sales)) < 4"}>}sales)

it return All  10,644,1876 which is wrong value.

Correct value is :-

G1 = 2.673 Billion

G2 = 0.718 Billion

Paul Yeo

5 Replies
paulyeo11
Valued Contributor II

Re: How to compute Sales By Group Amount only for Top 3 customer ?

My QVW

Re: How to compute Sales By Group Amount only for Top 3 customer ?

What is you use..

=Sum({<$(ColumnDim101) = {"=Rank(Sum(sales)) < 4"}>}sales)

paulyeo11
Valued Contributor II

Re: How to compute Sales By Group Amount only for Top 3 customer ?

Hi Sir

The return number wrong, it should not be so much .

see.png

Re: How to compute Sales By Group Amount only for Top 3 customer ?

How the correct value is

Correct value is :-

G1 = 2.673 Billion

G2 = 0.718 Billion

Can you provide example of above?

paulyeo11
Valued Contributor II

Re: How to compute Sales By Group Amount only for Top 3 customer ?

Hi Sir

When you Click on G1 Button , it will show the top 3 customer sales for G1 , when you add up the 3 row total it will be the total i need.

Paul

Community Browser