Skip to main content
Announcements
Qlik Community Office Hours, March 20th. Former Talend Community users, ask your questions live. SIGN UP
cancel
Showing results for 
Search instead for 
Did you mean: 
employe4_2
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
sunny_talwar

May be this

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

View solution in original post

6 Replies
sunny_talwar

May be this

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

pablolabbe
Luminary Alumni
Luminary Alumni

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
Contributor III
Contributor III
Author

thank you mate

employe4_2
Contributor III
Contributor III
Author

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 ?

Anil_Babu_Samineni

This is old there, if you want any help please create new thread. For now, you can try
count({<Flavor ={'chocolate'}, Quality ={'Good'}>}Cake )
Please add me Anil_Babu_Samineni to interact faster when reply back. Speak low think High.

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)
employe4_2
Contributor III
Contributor III
Author

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