# New to QlikView

Discussion board where members can get started with QlikView.

New Contributor III

Great! It works!

Thanks

Not applicable

## Re: ABC Analysis in Qlikview

Amazing dimension, I've been looking for this for days . Thanks!

Partner

## Re: ABC Analysis in Qlikview

Hi Sunny,

Thanks for you solution.
I have to view this ABC analysis at Shop No level.

can you please suggest any solution for this.

iIworked on this but i m facing issue in sorting in Aggr at Shopno and Article No level.

Any help is appreciated.

Thanks,

Vanraj Dinesh Bohra

MVP

## Re: ABC Analysis in Qlikview

Would you be able to share a sample where you have been doing this? and explain your required output?

Highlighted
Partner

## Re: ABC Analysis in Qlikview

Hi Sunny,

Dimension which i m using is :

=if(Aggr(sum(Aggr(RangeSum(Above(TOTAL Sum(Sales), 0,RowNo())) / sum(TOTAL <ShopNo,Week> Sales),ShopNo,(ArticleNo,(=Sum(Sales),DESC)))),ShopNo,ArticleNo) >0.90,'C',

if(Aggr(sum(Aggr(RangeSum(Above(TOTAL Sum(Sales), 0,RowNo())) / sum(TOTAL <ShopNo,Week> Sales),ShopNo,(ArticleNo,(=Sum(Sales),DESC)))),ShopNo,ArticleNo) >0.60,'B','A'))

My Output should be in this Format:

 Grade Shop 1 Shop 2 Total A Stocks 14507 11234 25741 B Stocks 7497 1212 8709 C Stocks 2480 343 2823 Total 24484 12789 37273

I figured out problem for above calculated dimension is we need sorting by Shopno and for Each shop by article number in descending order.

Regards,

Vanraj Dinesh Bohra

MVP

## Re: ABC Analysis in Qlikview

Oh nice... so you got what you wanted, right?

Partner

## Re: ABC Analysis in Qlikview

No Sunny,

my problem is output is not coming right because its unable to sort the data properly in Aggr Function at following level:

1. It should sort by Shopno.

2. for each shop it should sort articleno in descending order.

This is what i m trying to achieve with above calculated dimension, but still not found any success.

Do you have any solution for this.

Regards,

Vanraj Dinesh Bohra.

MVP

## Re: ABC Analysis in Qlikview

Try this

=Aggr(

If(RangeSum(Above(TOTAL Sum(Sales), 0, RowNo()))/Sum(TOTAL <ShopNo, Week> Sales) > 0.9, 'C',

If(RangeSum(Above(TOTAL Sum(Sales), 0, RowNo()))/Sum(TOTAL <ShopNo, Week> Sales) > 0.6, 'B', 'A')),

ShopNo, (ArticleNo, (=Sum(Sales), DESC)))

New Contributor

## Re: ABC Analysis in Qlikview

Hello Sunny,

Do you know how could I do to create a KPI for the 'A Stocks' or the 'B Stocks' without using a table?

I think I need to use set analysis but I don't know if that is possible.

For example:

sum ( {< Master dimension created = {'B Stocks'} >} TotalNetPrice)

What I don't know is what to type in "Master dimension created" so that it calculates it properly...

I would appreciate any help!