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: 
azucna122
Partner - Creator
Partner - Creator

EXPRESSION VALUELIST HIERARCHY

Hi, I'm new to Qlik
I had doubts about making a hierarchical field from a ValueList.
I wanted to make a pie chart, in which the first level would be: ValueList('Customer','Product')
By selecting any of these options, we would navigate through
IF(ValueList('Customer','Product')= 'Customer',
ValueList('Name','Age','Sex')
IF(ValueList('Customer','Product')= 'Product',
ValueList('Code','Category','SubCategory','Brand')))

This expression is not working, it does not show me the results of each partition well, it is always the same number, the expression is this:

IF(ValueList('Customer','Product')= 'Customer',
if(ValueList('Name','Age','Sex') = 'Name',num(sum({<[Anyo_Month] ={$(var_anyomes_filt)} >} NAME_ID),'#.##0'),
if(ValueList('Name','Age','Sex') = 'Age',num(sum({<[Anyo_Month] ={$(var_anyomes_filt)} >} AGE_ID),'#.##0'),
if(ValueList('Name','Age','Sex') = 'Sex',num(sum({<[Anyo_Month] ={$(var_anyomes_filt)} >} SEX_ID),'#.##0'),
IF(ValueList('Customer','Product')= 'Product',
if(ValueList('Code','Category','SubCategory','Brand')= 'Code',num(sum({<[Anyo_Month] ={$(var_anyomes_filt)} >} CODE_ID),'#.##0'),
if(ValueList('Code','Category','SubCategory','Brand')= 'Category',num(sum({<[Anyo_Month] ={$(var_anyomes_filt)} >} CATEGORY_ID),'#.##0'),
if(ValueList('Code','Category','SubCategory','Brand')= 'SubCategory',num(sum({<[Anyo_Month] ={$(var_anyomes_filt)} >} SUBCATEGORY_ID),'#.##0'),
if(ValueList('Code','Category','SubCategory','Brand')= 'Brand',num(sum({<[Anyo_Month] ={$(var_anyomes_filt)} >} BRAND_ID),'#.##0')
)))))))))

1 Solution

Accepted Solutions
Anil_Babu_Samineni

I won't recommend with Valuelist() or Valueloop() this case, rather please create a inline table in the format that you needed, and you can use Cyclic groups dimension to charts.

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

View solution in original post

1 Reply
Anil_Babu_Samineni

I won't recommend with Valuelist() or Valueloop() this case, rather please create a inline table in the format that you needed, and you can use Cyclic groups dimension to charts.

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