Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Announcements
Coming your way, the Qlik Data Revolution Virtual Summit. October 27-29. REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Contributor III
Contributor III

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

1 Solution

Accepted Solutions
Highlighted

May be this

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

View solution in original post

6 Replies
Highlighted

May be this

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

View solution in original post

Highlighted
Luminary
Luminary

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

Highlighted
Contributor III
Contributor III

thank you mate

Highlighted
Contributor III
Contributor III

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 ?

Highlighted

This is old there, if you want any help please create new thread. For now, you can try
count({<Flavor ={'chocolate'}, Quality ={'Good'}>}Cake )
Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)
Highlighted
Contributor III
Contributor III

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