Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
wondering do you have any suggestion creating a pie chart using multiple column without change the data structure
Having data structure like this, need to create other dashboard so can not change the structure :
Each row are each individual haveing A--G costs. and Total =sum(A:G) --Total is total cost
is there any chance can create pie chart for each individual t1, t2.....(will use filter for this so only need one pie chart)
showing the decomposition of the Total cost. So we do not need the total cost but have A:G in the same pie chart and see the %
here is the data (in the second sheet: name 'sheet 1')
Thank you.
For Dimension part
=type
/*pick(match(type,'New cars','Used cars','Service','Other Service','Spare parts','Bodyshop')
,'New cars'
,'Used cars'
,'Service'
,'Other Service'
,'Spare parts'
,'Bodyshop'
)
)*/
For measure part
pick(match(type,'New cars','Used cars','Service','Other Service','Spare parts','Bodyshop')
,Sum(New cars)
,Sum(Used cars)
,Sum(Service)
,Sum(Other Service)
,Sum(Spare parts)
,Sum(Bodyshop)
)
I tried use
both file name with or with out ' ' (quotation mark) still does not work
This not how I told u to do :
It was ValueList('New Cars',Used cars'...) etc
Please refer to my first message and try to adapt it tu ur dimensions using the ' '; in fact, we're here creating a new dimension with new values; and each value will be calculated apart.
I mean for the value New Cars for example, it will have as a measure: sum(NewCars) and so on.
Please try to adapt it and let me know
HI Omar
The solution you suggested is working
I change a little bit but have 1 question as follow (I was trying but do not know why)
if I have a column name called 'Used car' and with a space inside
when and where should I use [Used car] when should I use 'Used car' and when should I use Used car (with out '', or [] mark)?
and also for same column
for dimension
=ValueList('New cars','Used cars','Service','Other Service','Spare parts','Bodyshop')
For measure
if(ValueList('New cars','Used cars','Service','Other Service','Spare parts','Bodyshop')='New cars', sum([New cars]),
if(ValueList('New cars','Used cars','Service','Other Service','Spare parts','Bodyshop')='Used cars', sum([Used cars]),
if(ValueList('New cars','Used cars','Service','Other Service','Spare parts','Bodyshop')='Service', sum([Service]),
if(ValueList('New cars','Used cars','Service','Other Service','Spare parts','Bodyshop')='Other Service', sum([Other Service]),
if(ValueList('New cars','Used cars','Service','Other Service','Spare parts','Bodyshop')='Spare parts', sum([Spare parts]),
if(ValueList('New cars','Used cars','Service','Other Service','Spare parts','Bodyshop')='Bodyshop', sum([Bodyshop])
))))))
Hi yangcelinexu
I guess you will have to create an Island table in the script like -
Load * Inline
[
Type
'New cars',
'Used cars',
'Service',
'Other Service',
'Spare parts'
,'Bodyshop'
];
When we write 'New Cars' with '', it means, that this is a string value we've just created.
For actual fields that exists in ur script; when the field is composed, Qlik won't recognized as one field unless u surround it by double quotes " " or brackets [ ].
Hope that was clear?
I tried using the same formula, I have 3 columns: each consisting of 1s & 0s.
I got the message in the graph: