Forum Discussion
Dynamic line chart for CUSUM analysis
- Anonymous9 years ago
Hi BenFransen,
According to your description, you want to calculate dynamic value which based on "RiskScore" and "PatientDied" columns, right?
If that is a case, you can refer to belwo sample:
Measures:
CurrentValue =
var currPatientDied= LASTNONBLANK(Sheet2[PatientDied],[PatientDied])
Return
Max([RiskScore])*SWITCH(currPatientDied,FALSE(),1,TRUE(),-1)CUSUMValue =
SUMX(FILTER(ALL(Sheet2),Sheet2[EventID]<=MAX([EventID])),[CurrentValue])Create line chart:
Regards,
Xiaoxin Sheng
Hi BenFransen,
According to your description, you want to calculate dynamic value which based on "RiskScore" and "PatientDied" columns, right?
If that is a case, you can refer to belwo sample:
Measures:
CurrentValue =
var currPatientDied= LASTNONBLANK(Sheet2[PatientDied],[PatientDied])
Return
Max([RiskScore])*SWITCH(currPatientDied,FALSE(),1,TRUE(),-1)
CUSUMValue =
SUMX(FILTER(ALL(Sheet2),Sheet2[EventID]<=MAX([EventID])),[CurrentValue])
Create line chart:
Regards,
Xiaoxin Sheng