Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

devarasu07
Honored Contributor II

Re: ABC Analysis in Qlikview

Hi johnw, marcowedel,stalwar1 robert_mika swuehl, maxgro, kaushik.solanki marcus_sommer

Please find attached reference excel output file. Thanks

Best Regards, Deva

MVP
MVP

Re: ABC Analysis in Qlikview

After the pareto selects, I'm thinking add toggle select steps using firstsortedvalue() to pull the lowest one out of StockA and put it in StockB, and the lowest from StockB and put it in StockC. I'm getting inconsistent results, though.

Re: ABC Analysis in Qlikview

Can you share what you have right now? I would be eager to see the approach you have started?

MVP
MVP

Re: ABC Analysis in Qlikview

I don't have a very good understanding of firstsortedvalue(), though that part seems fine. What seems to be happening is that the steps in the action list are not executing in order, and my firstsortedvalue() is referencing a previous state of the alternate state. I'm able to get the intended results by moving the toggle selects to a "Fix" button, and manually pressing the two in order. Surely I'm missing something basic. Anyway, here's what I have. Press the two buttons in sequence, and it generates the right report. I suppose it could be done with one button and a macro, where you can be explicit about the sequence of steps, but that would be annoying.

Re: ABC Analysis in Qlikview

Just what you needed:

Recipe for a Pareto Analysis – Revisited

Now you don't need to create buttons to make this work. The Qlik have brought the ability to sort using an expression within the aggregate function. This will make your life so much more easier.

Best,

Sunny

devarasu07
Honored Contributor II

Re: ABC Analysis in Qlikview

Hi Sunny,

Thanks for the update, currently I'm using qlik 11.2 x version (serverand) & my client desktop 12v. do  I need to upgrade to latest version to make this bug fix will work.? Thanks

Regards,deva

Re: ABC Analysis in Qlikview

Not sure which version might have this functionality, but you would at least need QV 12 or higher.... Working on updating the sample to check if it actually works. I am very excited to test this out.

Best,

Sunny

Highlighted

Re: ABC Analysis in Qlikview

Here is the new chart

Dimension

=Aggr(If(

  rangesum(above(TOTAL (Sum({<ArticleNo>}TotalNetPrice)/Sum(TOTAL {<ArticleNo>} TotalNetPrice)),0,RowNo(Total)))<0.6,'A Stocks',if(

  rangesum(above(TOTAL (Sum({<ArticleNo>}TotalNetPrice)/Sum(TOTAL {<ArticleNo>} TotalNetPrice)),0,RowNo(Total)))>0.6 and rangesum(above(TOTAL (Sum({<ArticleNo>}TotalNetPrice)/Sum(TOTAL {<ArticleNo>} TotalNetPrice)),0,RowNo(Total)))<0.9,'B Stocks',

  'C Stocks'

  )

  ), (ArticleNo, (=Sum({<ArticleNo>}TotalNetPrice), DESC)))

Expression

=Count(DISTINCT ArticleNo)

=Count(DISTINCT ArticleNo)/Count(TOTAL DISTINCT ArticleNo)

=Sum(TotalNetPrice)

=Sum(TotalNetPrice)/Sum(TOTAL TotalNetPrice)

Capture.PNG

ciampaciampa
New Contributor III

Re: ABC Analysis in Qlikview

Sunny,

I want to use a measure or a calculated dimension as a "order by" parameter in the Aggr().

Reading your solution it seems possible. (ArticleNo, (=Sum({<ArticleNo>}TotalNetPrice), DESC)).

Am I wrong? Please could you confirm me?

Thanks a lot in advance

Regards

Re: ABC Analysis in Qlikview

This was recently introduced in QV12... you can read about it more here: Recipe for a Pareto Analysis – Revisited