Skip to main content
Announcements
Accelerate Your Success: Fuel your data and AI journey with the right services, delivered by our experts. Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
tommaso26
Contributor III
Contributor III

Cumulative percentage values on Line Chart

Hello!

I am trying to show the cumulative trend of a percentage value on a Line Chart.

I have the following simplified dataset:

tommaso26_1-1637659501215.png

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

 

1 Solution

Accepted Solutions
tommaso26
Contributor III
Contributor III
Author

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

tommaso26_1-1637662162715.png

 

Bye,

Tommaso

View solution in original post

1 Reply
tommaso26
Contributor III
Contributor III
Author

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

tommaso26_1-1637662162715.png

 

Bye,

Tommaso