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: 
data_RN
Creator
Creator

Help with Syntax for COUNT with two dimension requirements

Hello All, 

I am hoping I have an easy one for you 🙂

I am trying to get the count for the number of programs with an advanced business case that is in a stage of either seed, alpha OR beta and I am having a hard time with the syntax.  I can get it to count using just one stage, but I cannot figure out how to include the others.

Here is what I have: 

Count({<[Program Name] = {"=[Business Case Model] = 'Advanced' and [Current Stage]= 'Seed'"}>} [Program Name])

I would like something like this:  

Count({<[Program Name] = {"=[Business Case Model] = 'Advanced' and [Current Stage]= 'Seed' OR [Current Stage]= 'Alpha' OR [Current Stage]= 'Beta'"}>} [Program Name])

I could also use the negative form: 

Count({<[Program Name] = {"=[Business Case Model] = 'Advanced' and [Current Stage]<> 'Initial' OR 'Pre-Seed'"}>} [Program Name])

Any help is appreciated...thanks!

1 Solution

Accepted Solutions
jonathandienst
Partner - Champion III
Partner - Champion III

[Current Stage]= {'Seed', 'Alpha', 'Beta'}

is equivalent to Seed or Alpha  or Beta...

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein

View solution in original post

6 Replies
Anil_Babu_Samineni

Perhaps this?

Count(If(([Business Case Model]='Advanced' and [Current Stage] = 'Seed') or ([Current Stage]='Alpha' or [Current Stage]='Beta'), [Program Name]))

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
jonathandienst
Partner - Champion III
Partner - Champion III

You may be over complicating the problem. Try this:

Count({<[Business Case Model] = {'Advanced'}, [Current Stage]= {'Seed', 'Alpha', 'Beta'}>} [Program Name])
Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
Anil_Babu_Samineni

@jonathandienst  or I can think this way, As they are performing "Or" operator 🙂

Count({<[Business Case Model] = {'Advanced'}>+<[Current Stage]= {'Seed', 'Alpha', 'Beta'}>} [Program Name])

 

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
jonathandienst
Partner - Champion III
Partner - Champion III

[Current Stage]= {'Seed', 'Alpha', 'Beta'}

is equivalent to Seed or Alpha  or Beta...

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
data_RN
Creator
Creator
Author

This works!  I knew I was making it overly complicated.

Thank you for your quick reply!

Cheers!

data_RN
Creator
Creator
Author

Thank you for this!  I needed a sum of meeting both criteria, but I need this very thing in a different section and will definitely add it to my notes.

Thanks again for your speedy response!