Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello!
I am trying to show the cumulative trend of a percentage value on a Line Chart.
I have the following simplified dataset:
For each month I have an incoming quantity and an output quantity and I am computing the lost quantity as a percentage. So I obtain an average loss of 8% for the year.
I would like to display these data in a Line Chart (months as dimension) where I can see the cumulative trend of the Lost Quantity Percentage. That means in january I will see 4%, in february 7% ((4+9)/2), in march 7% ((4+9+8)/3), in april 5% ((4+9+8+1)/4), and so on...
Does anyone know how to do this with set analysis using chart functions?
Thank you very much,
Tommaso
Never mind, I solved it! 😁
I write my solution here below for anyone that may need it:
Dimension: months
Measure (% of lost quantity): Aggr(RangeSum(Above(sum(in)-sum(out)/sum(in),0,RowNo())),months)/RowNo()
and I obtain exactly what I needed, as shown here
Bye,
Tommaso
Never mind, I solved it! 😁
I write my solution here below for anyone that may need it:
Dimension: months
Measure (% of lost quantity): Aggr(RangeSum(Above(sum(in)-sum(out)/sum(in),0,RowNo())),months)/RowNo()
and I obtain exactly what I needed, as shown here
Bye,
Tommaso