Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

purdav80
New Contributor

QlikSense Distinct Count of Items that Makes 80% of Total Sales

Hi All,

Is there a way, with a formula, to get the number of items (count distinct of a field) that makes the 80% of sales (sum of sales field ordered top-down)?

For example, if I have:

Product CodeSales
Product 01500
Product 02200
Product 03300

500 (Product 01) + 300 (Product 03) = 800, that is the 80% of total Sales field, this means that result is 2 (count distinct of Product 01 and Product 03).

By searching in the community I've not found anything to get the result...

Many thanks in advance!

Regards,

Davide

1 Solution

Accepted Solutions
devarasu07
Honored Contributor II

Re: QlikSense Distinct Count of Items that Makes 80% of Total Sales

5 Replies

Re: QlikSense Distinct Count of Items that Makes 80% of Total Sales

May be this?

Count({<[Product Code] = {"=Avg(Sales) = 0.8"}>} DISTINCT [Product Code])

devarasu07
Honored Contributor II

Re: QlikSense Distinct Count of Items that Makes 80% of Total Sales

MVP
MVP

Re: QlikSense Distinct Count of Items that Makes 80% of Total Sales

May be this

Count({<[Product Code] = {"=Aggr(RangeSum(Above(Sum(Sales), 0, RowNo())), ([Product Code], (=Sum({<[Product Code]>} Sales), Desc)))/Sum(TOTAL Sales) <= 0.8"}>} DISTINCT [Product Code])

purdav80
New Contributor

Re: QlikSense Distinct Count of Items that Makes 80% of Total Sales

Hi,

I have found the solution by following both links (Pareto and ABC), Pareto for chart and ABC for table:

Many thanks!!

Regards,

Davide

purdav80
New Contributor

Re: QlikSense Distinct Count of Items that Makes 80% of Total Sales

Hi All,

Thanks to all for the quick help!

Regards,

Davide