Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

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)

Thanks for your help!

Update (12/04/2017)


Project and data appended.

Matlab Mockup Plot appended.

1 Solution

Accepted Solutions
shubham_singh
Partner - Creator II
Partner - Creator II

Add below code in our load scipt

Weights:

LOAD * INLINE [

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])

)

View solution in original post

4 Replies
shubham_singh
Partner - Creator II
Partner - Creator II

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

shubham_singh
Partner - Creator II
Partner - Creator II

Add below code in our load scipt

Weights:

LOAD * INLINE [

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])

)

Not applicable
Author

Thanks! Works like a charme.

shubham_singh
Partner - Creator II
Partner - Creator II

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