Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

employe4_2
New Contributor

Stupid easy question

Hi there!

I'm like really new trying out some thing on qlik sens june 2018  version.

Lets say i got some data like this :

CakeQuality
cake n°1good
cake n°2bad
cake n°3good

and therefore i have to indicate the proportion of bad cakes.

This feel like it is so ezasy to do but i cant figure out how to script that

my thoughts first :

=if ([cake]='bad', add 1 (into a variable wich i tried to create))

= count (variable i just tried to create)

but i feel  like i have to get on the good tracks again

thanks for your help

Tags (3)
1 Solution

Accepted Solutions

Re: Stupid easy question

May be this

Count(DISTINCT {<Quality = {'bad'}>} Cake)/Count(DISTINCT Cake)

6 Replies

Re: Stupid easy question

May be this

Count(DISTINCT {<Quality = {'bad'}>} Cake)/Count(DISTINCT Cake)

pablolabbe
Valued Contributor II

Re: Stupid easy question

Don´t Forget !


When applicable please mark the appropriate replies as CORRECT https://community.qlik.com/docs/DOC-14806. This will help community members and Qlik Employees know which discussions have already been addressed and have a possible known solution. Please mark threads as HELPFUL if the provided solution is helpful to the problem, but does not necessarily solve the indicated problem. You can mark multiple threads as HELPFUL if you feel additional info is useful to others

employe4_2
New Contributor

Re: Stupid easy question

thank you mate

employe4_2
New Contributor

Re: Stupid easy question

Hi man it been a while, 

i was wondering the other day, what if i want to add an other layer of selection;

with the same exemple , lets imagine i want to count({<Quality ={'Good'}>} Cake ) // lets say there is 5 good cakes

and count({<Flavor ={'chocolate'}>} Cake ) // lets say there is 7 chocolate cakes

But i want to count the number of good chocolate cakes  which is 3 cuz i burnt 4 chocolate cakes 

i tried these way but doesn't work: 

count({<Flavor ={'chocolate'}>} and {<Quality ={'Good'}>}Cake )

count({<Flavor ={'chocolate'}>} &{<Quality ={'Good'}>}Cake )

count({<Flavor ={'chocolate'}  and  Quality ={'Good'}>}Cake ) .... 

 

Do you have an hint for me ?

Re: Stupid easy question

This is old there, if you want any help please create new thread. For now, you can try
count({<Flavor ={'chocolate'}, Quality ={'Good'}>}Cake )
employe4_2
New Contributor

Re: Stupid easy question

thanks for replying, indeed it worked, didnt tried enough!
i'll creat a new thread next time, thanks again
Community Browser