Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Student | Program Day | Weight |
Bob A | 1 | 205 |
Bob A | 10 | 200 |
Bob A | 15 | 198 |
John A | 1 | 225 |
John A | 20 | 220 |
Given the above table, I want to generate a line chart that displays, for each Student by Program Day, the % change in the Student's weight from their first recorded Weight value; ie (current weight - first weight) / first weight. Note that I say first Weight instead of weight on Day 1 because the first weight doesn't have to coincide with Day 1 but it will always be recorded on the lowest Program Day value for that student.
How do I reference the first weight value in my % change expression?
Thanks, Steve
Maybe you could use something like this:
num(firstsortedvalue(Weight, -[Program Day]) / firstsortedvalue(Weight, [Program Day]) - 1, '0.0%')
or maybe
num(firstsortedvalue(Weight, -[Program Day]) / only(Weight) - 1, '0.0%')
- Marcus