4 Replies Latest reply: Apr 12, 2017 4:44 AM by Lukas Kredler

# Pie chart from weight vector

Hi,

I am new to quickSense and I am experiencing some problems with my first project. I think it probably related to my data structure. The input data is a simple Excel Sheet with time series data that looks as follows:

DateValue 1Value 2Weight 1Weight 2Weight 3...
1.1.200010010050%50%0%
1.2.200010510225%40%35%
...................
1.1.201528722230%30%40%

All Columns are imported as fields

I have already a line plot with dimension date and measure value 1 und value 2.

Now I want to add a PI-Chart that shows the average weights over the selected time period in the line chart.

Further Plots of the data should then occur only on this row-wise selection of the corresponding date.

If multiple lines are selected I want to average over the rows.

How do I have to choose the dimensions and measures to reflect that the data actually comes from different columns.

In a matlab syntax this would look like this:

idx = idxDatesSelected %row index of the selected columns

data2plot = mean([Weight1(idx) Weight2(idx) Weight3(idx)],1)

pie(data2plot)

Update (12/04/2017)

Project and data appended.

Matlab Mockup Plot appended.

• ###### Re: Pie chart from weight vector

I am unable to understand your problem, post some sample data and provide your desired output from matlab or any other tool.

• ###### Re: Pie chart from weight vector

Weights:

WeightID,Weights

1,Weights 1

2,Weights 2

3,Weights 3

];

Reload and then add a pie chart to UI with Weights as dimension and add below expression to Measure.

Pick(

Match(WeightID,1,2,3),

Sum([Weights 1]),

Sum([Weights 2]),

Sum([Weights 3])

)

• ###### Re: Pie chart from weight vector

Thanks! Works like a charme.

• ###### Re: Pie chart from weight vector

Could you tell me what is that you assumed that my answer was not correct, since you marked your question as assumed answer.