Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Expressions query

I have the script below which provides me with:

  • a sum of costs for Acute within the Quadrant field and
  • a sum of costs for In Patients etc... within the Quadrant Sub category, where the Quadrant is Mental Health

 

=money(Sum({1<Quadrant={"Acute"}>+1<Quadrant={"Mental Health"}, [Quadrant Sub category]=
{
"In Patients","Day Care", "Out Patients Procedures", "Outpatients East", "Outpatients West"}>} [Cost £]))

I'm looking to develop this, to say the above, but when the field "Episodes" is not blank

I would appreciate your advice on this

Many thanks

Claire

Labels (1)
1 Solution

Accepted Solutions
Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

Is this what you need?

=money(Sum({1<Quadrant={"Acute"},Episodes={"=len(trim(Episodes))>0"}>+1<Quadrant={"Mental Health"},Episodes={"=len(trim(Episodes))>0"}, [Quadrant Sub category]=
{
"In Patients","Day Care", "Out Patients Procedures", "Outpatients East", "Outpatients West"}>} [Cost £]))


talk is cheap, supply exceeds demand

View solution in original post

2 Replies
Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

Is this what you need?

=money(Sum({1<Quadrant={"Acute"},Episodes={"=len(trim(Episodes))>0"}>+1<Quadrant={"Mental Health"},Episodes={"=len(trim(Episodes))>0"}, [Quadrant Sub category]=
{
"In Patients","Day Care", "Out Patients Procedures", "Outpatients East", "Outpatients West"}>} [Cost £]))


talk is cheap, supply exceeds demand
Not applicable
Author

Thank you, worked perfectly!