Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello everyone
i want to show the percent of patients that their (send document date) -(discharge date) are greater than 21 to all patients
something like this:
if((A-B) >21 , Vsum=Vsum+1)
c=Vsum/totalpatients
i would appreciate if anyone can help me to write this formula
Create the Flag in script like below
LOAD *,
if([SendDocumentDate] - [DischargeDate] >21,1,0) as Flag_Days
.....
FROM Table;
Now use below expression
=count(DISTINCT {<Flag_Days={1}>} PatientID) / Count( distinct total PatientID)
Maybe something like
=Count(DISTINCT If( [SendDocumentDate] - [DischargeDate] >21, VisitID)) / Count(DISTINCT VisitID)
or in a chart context to ignore dimensions, use an additional TOTAL qualifier:
=Count(DISTINCT If( [SendDocumentDate] - [DischargeDate] >21, VisitID)) / Count(DISTINCT TOTAL VisitID)
Create the Flag in script like below
LOAD *,
if([SendDocumentDate] - [DischargeDate] >21,1,0) as Flag_Days
.....
FROM Table;
Now use below expression
=count(DISTINCT {<Flag_Days={1}>} PatientID) / Count( distinct total PatientID)
Thanks to reply
it should be correct but unfortunately didn't work.
Thanks anyway ![]()
Many Thanks Kushal![]()