Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi there,
I am trying to create a Kaplan Meier chart using two cyclical dimensions:
1) Time
2) Cycle 1 (containing SmokerHistory and differentation.
One of the expressions i need to calculate this is the cummulative number of deaths for each line on the graph. I can get it to work with one line (selecting a value for SmokerHistory for example) but it wont work for multiple lines as the cummulative deaths number does not seem to work.
My calculation for deaths looks like this:
rangesum(above(Total sum(Event),0,Time))
Event is 1 if there is a death.
I can get this to work in a pivot table but I need to display this on a line graph. How to I calculate the cummulative deaths for the line when there are multiple lines selected?
Please help!!
right I think its almost there by doing this method:
if(GetCurrentField([Cycle 1])='SmokingHistory',
//$(=lineval)
//LineValue
rangesum(above(Total sum({$ < SmokingHistory={$(=lineval)} >} Event),0,rowno(total))),
)
The variable brings back the correct value and is essentially the same as just using LineValue function. For some reason the variable doesnt work in set analysis though, any ideas?
lineval variable contains:
FirstSortedValue($(=getcurrentfield([Cycle 1])), recID)
The idea is then I only need to do nested if for each dimension within [Cycle 1]
Here is an example of how to create the Kaplan Meier Curve