Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
jespermiles
Contributor
Contributor

Yes / No scores conditioned on Yes scores

Hi,

I have a speedometer, which need to display a score of:

Column A (Yes scores) / Column B (No scores)

But Column B (No scores) needs to only count the answers where they have selected (Yes scores) in Column A and (No scores) in Column B.

At the moment I use

sum(if(match([Var der udsolgte situationer da du ankom?],'Ja'),1,0))/sum(if(match([Er der fortsat udsolgte situationer når du forlader butikken?],'Nej'),1,0))

This will sum every yes score, and every no score instead of conditioning the no scores based onthe yes scores.

Hope this makes sense.

1 Solution

Accepted Solutions
shraddha_g
Partner - Master III
Partner - Master III

try:

Count({<Is the product out of stock at arrival? = {'Yes'}>} [Is the product out of stock at arrival?])/

Count({<Is the product out of stock at arrival? = {'Yes'},[Is the product out of stock at departure?] = {'No'}>} [Is the product out of stock at departure?])

View solution in original post

7 Replies
shraddha_g
Partner - Master III
Partner - Master III

can you share sample data? on basis sample data can you explain your expected output?

jespermiles
Contributor
Contributor
Author

Hi Shraddha,

Here is a photo of the data.

dummydata Qlik - Launis.PNG

Column A:

Is the product out of stock at arrival?

Column B:

Is the product out of stock at departure?

I want a score of OOS at arrival / OOS at departure. Although, if the product is NOT OOS at arrival, I dont want to include it in the score.

Hope this helps.

shraddha_g
Partner - Master III
Partner - Master III

I want a score of OOS at arrival / OOS at departure. Although, if the product is NOT OOS at arrival, I dont want to include it in the score

Can you elaborate this one?

if(Column A = Yes) then only I have to consider Score of Column B = Yes?

jespermiles
Contributor
Contributor
Author

If(Column A = Yes) divide with If(Column B=No)

In the case of the attached photo, the score would be "1".

The goal is to have a score from 0 to 1.

Where 0 is OOS at arrival, and always OOS at departure.

1 would be OOS at arrival, and never OOS at departure,

bwisealiahmad
Partner - Specialist
Partner - Specialist

Sample data would be good, but sounds like you  need to make an IF statement first to figure out which Column B scores to do and then  do the calculation.

shraddha_g
Partner - Master III
Partner - Master III

try:

Count({<Is the product out of stock at arrival? = {'Yes'}>} [Is the product out of stock at arrival?])/

Count({<Is the product out of stock at arrival? = {'Yes'},[Is the product out of stock at departure?] = {'No'}>} [Is the product out of stock at departure?])

jespermiles
Contributor
Contributor
Author

This worked perfectly. Thank you!