Qlik Community

Ask a Question

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
Support Cases coming to Qlik Community Oct. 4! Start chats, open cases, explore resources: READ DETAILS
cancel
Showing results for 
Search instead for 
Did you mean: 
ashmitp869
Creator
Creator

Expression assistance required

Hi ,

Please kindly assist me in my below expression - I need to get the % value 

Dimension : variable - [$(vDisplayedBy)],Phase_Outcome_Status, Clinical_pain

value : Phase_Outcome_Status - Phase Start , Phase End

Value : Clinical_pain - Met , Not Met

 

Expression used :

to get outcome -

if(Phase_Outcome_Status='Phase Start',

if(Clinical_Pain='Pain Outcomes (Met)',Sum({<Episode_Phase_seq={1}>} Measure_PCPSS_Clinician_Rated_Pain_N),Sum({<Episode_Phase_seq={1}>}Measure_PCPSS_Clinician_Rated_Pain_D)- Sum({<Episode_Phase_seq={1}>}Measure_PCPSS_Clinician_Rated_Pain_N))
,
if(Clinical_Pain='Pain Outcomes (Met)',Sum({<Episode_Phase_seq_rev={1}>} Measure_PCPSS_Clinician_Rated_Pain_N),Sum({<Episode_Phase_seq_rev={1}>}Measure_PCPSS_Clinician_Rated_Pain_D)- Sum({<Episode_Phase_seq_rev={1}>}Measure_PCPSS_Clinician_Rated_Pain_N))

)

 

to get the % I am struggling - divide by Total and group by Phase_Outcome_Status 

if(
Phase_Outcome_Status='Phase Start',

Sum({<Episode_Phase_seq={1}>} Measure_PCPSS_Clinician_Rated_Pain_N)/Sum({<Episode_Phase_seq={1}>} Total <[$(vDisplayedBy)]> Measure_PCPSS_Clinician_Rated_Pain_D)
,
Sum({<Episode_Phase_seq_rev={1}>} Measure_PCPSS_Clinician_Rated_Pain_N)/Sum({<Episode_Phase_seq_rev={1}>} Total <[$(vDisplayedBy)]> Measure_PCPSS_Clinician_Rated_Pain_D)

)

 

data.PNG

0 Replies