Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

New Contributor

Count different rate by selection

Hi Everyone, I am the beginner of QlikView. Now, if I want to count different recipe success rate by selecting the ingredient, Can anyone show me the script in QlikView?Thanks!

To simplifier the case, I make an example as below which only have 2 example:

Table A: Different Recipe success times:

Recipe No .of  Sucess TrialsTotal Trial

The recipes are made by below ingredient

Table B: The ingredients of the recipe:

Recipe Ingredients









I want to create a selection box in Qlikview, people can select any ingredients in the box, then Qliview will check whether the database exists the corresponding recipe or not, once the database found the result, the success rate will be calculated.

For example,

If  I select A1 A2 B2 in ingredients selection box. Since no recipe was made by A1,A2,B2, the success rate is Zero,

If I select A1 A2 B1 in ingredients selection box. Since recipe A was made by A1 A2 B1, the success rate is 3/7=42.8%

If I select A1 because A1 can be used for Recipe A and Recipe B, the success rate is (3+2)/(7+5)=41.7%

Appreciate if anyone can help. Thanks!

1 Reply
New Contributor

Re: Count different rate by selection

Furthermore, if  I want to compare two ingredients success rate.

For example, I select A1 and A2. since A1 can make Recipe A and B, Its success rate will be (3+2)/(7+5) and A2 success rate is 3/7).

How can I write a script to make two result exists in one table!

Community Browser