Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
chetanpatel
Contributor III
Contributor III

Convert If expression to Qlick view expression

Equion with avg working in text object but equation with  sum not  working please help me to solve error.

=AVG(if(EffectiveDate=Date(today() -1),CurrentIPLOS))
=sum({<EffectiveDate={"$Date(today() ))"} >}CurrentIPLOS)

Labels (1)
1 Solution

Accepted Solutions
chetanpatel
Contributor III
Contributor III
Author

Found answer my self here is  the working equation

=count({<ReportDate ={">=$(=PatientEncounter.ForwardClinicStartDATE)"} ,ReportDate ={"<=$(=PatientEncounter.ForwardClinicEndDATE)"} >}PatientID)

View solution in original post

6 Replies
anderseriksson
Partner - Specialist
Partner - Specialist

Your $-expansion is missing a "(";
sum({<EffectiveDate={"$(Date(today() ))"} >}CurrentIPLOS)

Use the measures editor preview to see the expanded version of your expression.
You might also have problem with the date, often it needs to be in its text representation to work in set-analysis.
sum({<EffectiveDate={"$(Text(Date(today() )))"} >}CurrentIPLOS)

anderseriksson
Partner - Specialist
Partner - Specialist

Might actually need a '=' also in the expansion;
sum({<EffectiveDate={"$(=Date(today() ))"} >}CurrentIPLOS)

chetanpatel
Contributor III
Contributor III
Author

Thank you.

chetanpatel
Contributor III
Contributor III
Author

Thank you

chetanpatel
Contributor III
Contributor III
Author

one more if  equation where i want to convert into Qlick view equation.

*********************************************************************************

IF  equation

COUNT( DISTINCT(IF(ReportDate>=PatientEncounter.ForwardClinicStartDATE AND ReportDate<= PatientEncounter.ForwardClinicEndDATE ,PatientID)))

*******************************************************

Below  equation not working

COUNT({<ReportDate={"$(>PatientEncounter.ForwardClinicStartDATE"} >}PatientID)

 

chetanpatel
Contributor III
Contributor III
Author

Found answer my self here is  the working equation

=count({<ReportDate ={">=$(=PatientEncounter.ForwardClinicStartDATE)"} ,ReportDate ={"<=$(=PatientEncounter.ForwardClinicEndDATE)"} >}PatientID)