Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements
QlikView Fans! We’d love to hear from you.
Share your QlikView feedback with the product team… Click here to participate in our 5-minute survey.
Rules, plus terms and conditions, can be found here.
Not applicable

Range of product calculation based on subtotals

hi all

I have formula that calculates me our range of products:

count(distinct Artikel)/count(distinct all Artikel)

Customer     Range of products

A               16.9%

B               5.8%

C               3.1%

D               ....

...

now, I want to add different brands to the artikel, so that I know how much range of products per Customer is,

but the calculation has to be based on the total per brand

Customer        Brand       Range of products

A                    X                    16.9%

B                      Y                  5.8%

C                        Z                3.1%

D              

Thanks for your help

2 Replies

Re: Range of product calculation based on subtotals

Maybe this:

count(total <Customer> distinct Artikel)/count(distinct all Artikel)


talk is cheap, supply exceeds demand
Not applicable

Re: Range of product calculation based on subtotals

the formula works, but the result is wrong :-)

I want to know the % of the range of product by brand and Customer

... that means article by brand

so you have a customer that has 5 auf 10 products, the result should be 50%

Community Browser