Skip to main content
Announcements
Live today at 11 AM ET. Get your questions about Qlik Connect answered, or just listen in. SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Value list in Dimension

Hi Everyone

I have chart with dynamic dimension

 

=ValueList('Male','Female')

Expression shows count of total employees.

Currently is independent of this dimension , showing count  of total employees in both row

Want to show decomposition of count of employees by gender.

Thanks in advance

1 Solution

Accepted Solutions
jonathandienst
Partner - Champion III
Partner - Champion III

Hi

ValueList is not linked to the fields in your model. You will have to create these links yourself. Let me show you by example.

Suppose that we have in our model, a fields called empID, empName, empGender; and that empGender contains either 'M' or 'F'. Now you create a table using dimension =ValueList('Male', 'Female') as you have done. Now create the expression:

Count(Distinct If(ValueList('Male', 'Female') = 'Male' And empGender = 'M', empID,

  If(ValueList('Male', 'Female') = 'Female' And empGender = 'F', empID)))

You need to have the valuelist exactly as defined in the dimension.

HTH

Jonathan

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

View solution in original post

2 Replies
jonathandienst
Partner - Champion III
Partner - Champion III

Hi

ValueList is not linked to the fields in your model. You will have to create these links yourself. Let me show you by example.

Suppose that we have in our model, a fields called empID, empName, empGender; and that empGender contains either 'M' or 'F'. Now you create a table using dimension =ValueList('Male', 'Female') as you have done. Now create the expression:

Count(Distinct If(ValueList('Male', 'Female') = 'Male' And empGender = 'M', empID,

  If(ValueList('Male', 'Female') = 'Female' And empGender = 'F', empID)))

You need to have the valuelist exactly as defined in the dimension.

HTH

Jonathan

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

Thanks Jonathan

It worked