Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Posting on Qlik Community is temporarily paused for some users. Thank you for patience and we'll update you soon!
cancel
Showing results for 
Search instead for 
Did you mean: 
RMMFCA
Contributor II
Contributor II

Set Analysis That Will Satisfy Both Conditions

Hello,

I am having trouble with coding a set analysis expression in a KPI and was hoping for some help.

The example below displays the solution I am looking for in the Result column. The Result column doesn't exist, it's there to show you what I am specifically looking for.

ID TestOne TestTwo Result
001 NotMet NotMet NotMet
002 Met NotMet NotMet
003 Met Met Met

 

I need to count all the IDs that have Met both courses and put this aggregate in a KPI (The answer in this example would be 1). BookID BOOKONE has TestOne in it and BookID BOOKTwo has TestTwo in it. I tried the following set analysis but it counts IDs that were Met in either column. 

Count({<[BookID]={'BOOKONE', 'BOOKTWO'}, [TestCode]={'TestOne', 'TestTwo'}, [Rule Met]={'Met'}>} DISTINCT [ID])

Any help would be apprciated.

Labels (5)
2 Replies
stevejoyce
Specialist II
Specialist II

Try this.

Count({<[BookID]={'BOOKONE'}, [TestCode]={'TestOne'}, [Rule Met]={'Met'}> * <[BookID]={'BOOKTWO'}, [TestCode]={'TestTwo'}, [Rule Met]={'Met'}>} DISTINCT [ID])

RMMFCA
Contributor II
Contributor II
Author

I tried this and it did not work unfortunately. It came up with the value of 0.