Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All
Company asked me to build one of their old models into QlikView. They have a Doughnut Pie chart that shows the Sum(CreditAmount)
per Group. There are 3 groups (Group1, Group2, Other). The trick is that you can select from 2 dropdown boxes which Banks you want to allocate to Group1 and Group2. Whatever was not selected in Group1 (Dropdown box 1) and Group2 (Dropdown box 2) will automatically fall under "Other". If you selected a Bank in Dropdown box 1 (Group1) it will not be available for selection in the Dropdown box 2 (Group2)
Any ideas??
Hi,
here is a way :
in the script, make a cross within banks to create fields group1 and group2 like this :
you'll replace Product of my example test with Bank
tmp:
load distinct Produit as group1 resident 'your table';
outer join (tmp) load group1 as group2 resident tmp ;
tmp2:
load *,1 resident tmp where group1 <> group2;
group:
load group1,group2,if(iterno()=1,group1,group2) as Produit resident tmp2 while iterno()<=2 ;
so you can have two distincts selection boxes with group1 and 2
if(valuelist('1','2','others')='1',sum(total {<Produit = P(group1) >} Prix),
if(valuelist('1','2','others')='2',sum(total {<Produit = P(group2) >} Prix),
sum(total {<Produit = E(group1), Produit= E(group2)>} Prix)))
replace Prix with CreditAmount and Produit with Banks
and you can too add a text box to control a mistake where one bank could be in the two groups :
choices in error :
= concat(aggr( only({$<Produit = P(group1 ) * P(group2) >} Produit ) ,Produit),'//')
regards
Hi Olivier
My Pie chart always shows 1 = 33.33% 2 = 33.33% and Other 33.33%.?
Hi Jay,
could you send some rows of data sample (xls) ?
and a sample of table group after creation in script ?
thanks
How do I upload a .qvd file?