Qlik Community

Qlik Sense App Development

Discussion board where members can learn more about Qlik Sense App Development and Usage.

Announcements
BARC’s The BI Survey 19 makes it official. BI users love Qlik. GET REPORT
EvanBarrick
Contributor

Expressions with Conditions

I am creating a simple pie chart for gender. The data set has these possible values for Gender

-FEMALE, Female, MALE, Male, rbtFemale and rbtMale

I want to create the chart where I group the Female, FEMALE and rbtFemale into a expression as Female and the same for Male.

 

So I think my expression would be something similar to =Count(If(Gender ='Male' or Gender ='MALE' or Gender = 'rbtMale', UserID)) but I do not get the expected results

2 Replies
Support
Support

Re: Expressions with Conditions

What about If(Gender ='Male' or Gender ='MALE' or Gender = 'rbtMale', count UserID) ?

You may be able to use substring function, but I think you will have to use a function to change everything to lower case and look for the substring "Male" after it.

To help users find verified answers, please don't forget to mark a correct resolution or answer to your problem or question as correct.
Partner
Partner

Re: Expressions with Conditions

You could solve it by using set analysis

Male:

= count({<Gender={'Male','MALE','rbtMale'}>}UserID) 

Female:

= count({<Gender={'Female','FEMALE','rbtFemale'}>}UserID) 

 BR 

Vegar

Plees ekskuse my Swenglish and or Norweglish spelling misstakes