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

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
hopkinsc
Partner - Specialist III
Partner - Specialist III

Calculated Condition

hi, i am trying to write a calculated condition. I want the user to select a few specific fields before displaying the results.
What i want is....
The user to select 1 of 4 fields AND another 1 of 2 fields.....

my fields are: [Retail Group], [BDA Name], [Area Manager Name], Customer, Cal_Week, StoreDate

Eg,
The user is to select either:
[Retail Group], [BDA Name], [Area Manager Name], Customer

AND either
Cal_Week, StoreDate

I have tried using the following,

GetSelectedCount ([Retail Group]) > 0 or GetSelectedCount ([BDA Name]) > 0 or GetSelectedCount ([Area Manager Name]) > 0 or GetSelectedCount (Customer) > 0 and GetSelectedCount (Cal_Week) > 0

This works fine if i only have 1 field at the end, (Cal_Week or StoreDate)
Can someone help please?

AND either

Cal_Week, StoreDate

3 Replies
jonathandienst
Partner - Champion III
Partner - Champion III

Hi

Perhaps this...

GetSelectedCount ([Retail Group]) > 0 or GetSelectedCount ([BDA Name]) > 0 or GetSelectedCount ([Area Manager Name]) > 0 or GetSelectedCount (Customer) > 0 and (GetSelectedCount (Cal_Week) > 0 or GetSelectedCount(StoreDate))

Hope that helps

Jonathan

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
jonathandienst
Partner - Champion III
Partner - Champion III

Oops - should read this way:

(GetSelectedCount ([Retail Group]) > 0 or GetSelectedCount ([BDA Name]) > 0 or GetSelectedCount ([Area Manager Name]) > 0 or GetSelectedCount (Customer) > 0) and (GetSelectedCount (Cal_Week) > 0 or GetSelectedCount(StoreDate))

Jonathan

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
hopkinsc
Partner - Specialist III
Partner - Specialist III
Author

Thanks Jonathan, that worked great.

I'm sure i tried that though and it didn't work.....

Working now though.

thanks