# Deployment & Management

Discussion board where members learn more about Qlik Sense Installation, Deployment and Management.

Announcements
QlikWorld 2023, a live, in-person thrill ride. Save \$300 before February 6: REGISTER NOW!
cancel
Showing results for
Did you mean:
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)
• ### General Question

1 Solution

Accepted Solutions
Contributor III
Author

Found answer my self here is  the working equation

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

6 Replies
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)

Partner - Specialist

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

Contributor III
Author

Thank you.

Contributor III
Author

Thank you

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)

Contributor III
Author

Found answer my self here is  the working equation

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

Community Browser