Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Good morning.
I have a table where I have two fields that are grouped with their values.
Need to group on a chart table, the total price never pass 900.00.
If you arrive to 900.00 is created a new line with the rest and so on.
If we were to limit for number of records could use a field with "div (rowno (), 900) + 1 the Group", but I'm willing to limit the sum of the values.
Can someone help me?
Good correction
A better solution
rangemax(0,rangemin(900,Sum(F3)-(ValueLoop(1,10)-1)*900))
Please find attached one possible solution
Clever Anjos I think this would need to be dynamic as what happens if this is the data:
LOAD * INLINE [
F1, F2, F3
13, 90, 100
13, 90, 200
13, 90, 100
13, 90, 600
13, 90, 100
13, 90, 200
13, 90, 100
13, 90, 600
];
Correct me if I am wrong Marcio Arruda, but I think the solution then would be 900, 900, 200 in three rows
Good correction
A better solution
rangemax(0,rangemin(900,Sum(F3)-(ValueLoop(1,10)-1)*900))
Super with the second dimension changed to ValueLoop(1, 10)
First, thank you for your response.
I understand, but when you use really will not know beforehand what the total values nor how many rows will need to complete the full amount. Which lists need to be dynamic.
I made some changes and is an example where choosing jurisdiction is 12/2015 the value of the third row is negative.
Corrigir Sunny T
This solution is best.
We need to set a maximum, for example 100.
You can extrapolate, to 1.000 or 10.000, at the cost of performance
I understood Clever Anjos, but the way you did has served me.
Thank you so much.