Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have 3 fields:
I want to make pie chart that has 1 demission of the city and 2 measures of the sum cost1 and the sum cost2.
so if sum of cost 1 is 27% of the total and cost2 is 73% of the total the chat should look like that:
I tried to do it but the widget has only 1 measure
Assuming your data is as below, create a dummy dimension to use in the pie chart
Table:
load * inline [
City,Cost1,Cost2
A,100,300
B,200,900
];
DummyDim:
Load * inline [
CostType,so_Ctype
Cost1,1
Cost2,2
];
exit script;
then in chart use
Dimension
=CostType
Measure
=Pick(so_Ctype, Sum(Cost1)/ sum(Cost1+Cost2), Sum(Cost2)/ sum(Cost1+Cost2) )
cost 1= 300 / 1500
cost 2 = 1200/ 1500
Assuming your data is as below, create a dummy dimension to use in the pie chart
Table:
load * inline [
City,Cost1,Cost2
A,100,300
B,200,900
];
DummyDim:
Load * inline [
CostType,so_Ctype
Cost1,1
Cost2,2
];
exit script;
then in chart use
Dimension
=CostType
Measure
=Pick(so_Ctype, Sum(Cost1)/ sum(Cost1+Cost2), Sum(Cost2)/ sum(Cost1+Cost2) )
cost 1= 300 / 1500
cost 2 = 1200/ 1500