Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Dimension in ValueList

How can we add Dimesions in Valuelist?

1 Solution

Accepted Solutions
robert_mika
Master III
Master III

You can not.

Valuelist can only take static values.

View solution in original post

6 Replies
robert_mika
Master III
Master III

You can not.

Valuelist can only take static values.

settu_periasamy
Master III
Master III

Hi,

Do you mean Dimension values in Valuelist?

You can create a variable, and you can use that in your Dimension.

Check, if this suits for you

vCheck :  =Concat(DISTINCT chr(39)&Dim1&chr(39),',')

Dimension : =ValueList($(vCheck))

Expression :

=Pick(Match(ValueList($(vCheck)),$(vCheck)),sum({<Dim1={A}>}Sales),

sum({<Dim1={B}>}Sales),sum({<Dim1={C}>}Sales),sum({<Dim1={D}>}Sales))

refer the attachment

CELAMBARASAN
Partner - Champion
Partner - Champion

Hi,

Instead adding dimension field to Value list, add the values to the dimension within the Load script. So that you can simply use

if(field='value1', Expr1,//for value list texts

     if(field='value2', Expr2,//for value list texts

               Expr3))//for dimension values

Not applicable
Author

Thank you for the reply.

Here my problem is little different, I want to add Total row in Bar Chart. So "Total"  should be added to the dimension list.

Could you suggest any workaround?

petter
Partner - Champion III
Partner - Champion III

You can certainly use settu_periasamy's suggestion but appending the TOTAL to the list :

vCheck :  =Concat(DISTINCT chr(39) & Dim1 & chr(39) , ',' ) & ', ''TOTAL'' '

Dimension : =ValueList( $(vCheck) )

Or you might be better off making the appending in the load script by just adding the extra TOTAL value there.

Not applicable
Author

Thank you. I choose 2nd option. because it is not required to define different expressions for each dimension value.