Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

calculation of range of products

hi all,

I have following issue. Need to know the relatively range of products a customer has. I have a total range of products available (pricelist)

let's say 4000 units and a customer based product range, let's say 400 units .... so the result is 10%...

unfortunately I cannot find the funktion how to unlock the total available products from the selection I do, when I selcect a customer.

At the moment I always get 100% because both figures are linked to the selection criteria.

Hope you can help, thanx

Oliver

1 Solution

Accepted Solutions
Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

Maybe like this then: count(distinct Artikel)/count({1} distinct total Artikel)


talk is cheap, supply exceeds demand

View solution in original post

12 Replies
israrkhan
Specialist II
Specialist II

you have to count Total Products and to devide by Selected >>possible product for selected customer.

like so, =Count(Total Distinct ProductID) / Count(getfieldselections(Distinct ProductID))

Not applicable
Author

there must be something wrong in the last part... something is not working

==> / Count(getfieldselections(Distinct ProductID))

Not applicable
Author

sorry, I'm an absolutely beginner 🙂

israrkhan
Specialist II
Specialist II

what is your field name ,? is it ProductID , Replace it with your field..

or share the sample doc

Not applicable
Author

Count (Total DISTINCT Artikel)/ Count(GetFieldSelections(Distinct Artikel))

my field: Artikel

in the 2nd part of the formula is Distinct Artikel black colored.

Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

Try count(distinct Artikel)/count(distinct total Artikel)


talk is cheap, supply exceeds demand
Not applicable
Author

then I get always 100%

Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

Maybe like this then: count(distinct Artikel)/count({1} distinct total Artikel)


talk is cheap, supply exceeds demand
israrkhan
Specialist II
Specialist II

Try This, that was not correct 

=count(all distinct  Artikel) / GetPossibleCount(Artikel)

try this in text box, select any customer, you will get the average