Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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')
)))))))))
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.
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.