Skip to main content

# QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
Action-Packed Learning Awaits! QlikWorld 2023. April 17 - 20 in Las Vegas: REGISTER NOW
cancel
Showing results for
Search instead for
Did you mean:
Not applicable

## Multiple Set Analysis

I am trying to pull through the sum of Cost for:

• Quadrant (field), where the field shows "Acute"
• Quadrant (field), where the field shows "Mental Health", but only where the Quadrant sub category (field) shows "Day Care" and "In Patients".

I have used a set analysis wizard to create the script below, and QV tells me that the expression is ok, but the chart is showing "no data to display".

=Money(Sum({1<Quadrant+={'Acute'},Quadrant+=P({1<Quadrant={\$(=Mental Health)}>}Day Care)>}Cost))

What am I doing wrong? Grateful for any advice please

Many thanks

Claire

1 Solution

Accepted Solutions
Master II
 What am I doing wrong?

Using the set analysis wizard

-In set analysis you can't use the fields more than one time in a set, you've used the Quadrant twice (think of this as using two listboxes simultaniously).

-the \$-sign expansion tries to evaluate the expression, but there is and error as Mental Health is used without quotes and it's not a field name.

-Day Care is also used in a wrong way, since the using of P function assumes a field name, not the value.

You could try this:

=Sum({1<Quadrant={"Acute"}>+1<Quadrant={"Mental Health"}, QuadrantSubCategory={"In Patients","Day Care"}>} Cost)

2 Replies
Master II
 What am I doing wrong?

Using the set analysis wizard

-In set analysis you can't use the fields more than one time in a set, you've used the Quadrant twice (think of this as using two listboxes simultaniously).

-the \$-sign expansion tries to evaluate the expression, but there is and error as Mental Health is used without quotes and it's not a field name.

-Day Care is also used in a wrong way, since the using of P function assumes a field name, not the value.

You could try this:

=Sum({1<Quadrant={"Acute"}>+1<Quadrant={"Mental Health"}, QuadrantSubCategory={"In Patients","Day Care"}>} Cost)

Not applicable
Author

I did try using the set analysis wizard and that's the formula it gave me, so it's obviously not all that straight forward!

Thank you Whiteline for your advice, much appreciated!

Community Browser