Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Given the following data:
Timepoint | value |
c1d1.a | 1 |
c1d1.b | 2 |
c1d1.c | 3 |
c1d2.a | 4 |
c1d2.b | 5 |
c1d2.c | 6 |
I want to create a line chart where Timepoint is the dimension and the measure is the value at that Timepoint divided by the value at the previous/corresponding ".a" base Timepoint.
Timepoint | value | result |
c1d1.a | 1 | 1/1=1 |
c1d1.b | 2 | 2/1=2 |
c1d1.c | 3 | 3/1=3 |
c1d2.a | 4 | 4/4=1 |
c1d2.b | 5 | 5/4=1.25 |
c1d2.c | 6 | 6/4=1.5 |
There will always be an ".a" timepoint but the number of following timepoints is not fixed. If it helps, I have the ability to add a BaseTimepoint column that references the associated ".a" timepoint for each record.
Is this possible to render without any additional tables/mapping?
Thank you,
Steven
If you can create two new fields like this
Table:
LOAD *,
SubField(Timepoint, '.', 1) as Base,
SubField(Timepoint, '.', 2) as Time;
LOAD * INLINE [
Timepoint, value
c1d1.a, 1
c1d1.b, 2
c1d1.c, 3
c1d2.a, 4
c1d2.b, 5
c1d2.c, 6
];
You should then be able to use this
value/Only(TOTAL <Base> {<Time = {'a'}>} value)