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

Announcements
FLASH SALE: Save $500! Use code FLASH2026 at checkout until Feb 14th at 11:59PM ET. Register Now!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Question on set analysis when adding 2nd dimension

I've been staring at this for an hour and can't fathom why this is not working. Probably something simple but could use some help.

have a chart that was working wonderfully for me. Stripping it down to what is not working, I have the following

Dimension: Facility

Expression: sum({$<Facility=,Service=,rptPeriodColonIsDPCText={'Base'}>} total isEligible)

Result: I then filter it to a single Employer = 'SampleEmployer' and get this, accurate, result set:

       

FacilityIs Eligible
Specialists14335
Primary Care14335
Pharmacy14335
Outpatient14335
Inpatient14335
Direct Primary14335
Total14335

When I add another dimension called Employer, I want the Expression to be limited to only isEligible per Employer

Dimensions: Facility, Employer

Expression: sum({$<Facility=,Service=,rptPeriodColonIsDPCText={'Base'}>} total <Employer> isEligible)

>> You'll see that I Added the qualifier on the total <Employer>, which I thought would  limit to just the Employer. I expected the same result set as above but instead I receive this:

EmployerFacilityIs Eligible
Sample EmployerSpecialists6016
Sample EmployerPrimary Care6016
Sample EmployerPharmacy6016
Sample EmployerOutpatient6016
Sample EmployerInpatient6016
Sample EmployerDirect Primary6016
Sample EmployerTotal6016

Why does it not return 14335? Any idea what I Am doing wrong here?  I think I've included all pertinent info but lmk if not. Thanks

Eric

9 Replies
chematos
Specialist II
Specialist II

sum({$<Facility=,Service=,rptPeriodColonIsDPCText={'Base'}, Employer=>} total isEligible)

Not applicable
Author

thanks, Jose, I appreciate the help. I'm still stuck on this. Unfortunately, your answer gives me the sum(isEligible) across all employers, not per employer. I might have cut off some pertinent info in my original question so let me give more detail. The solution you gave gives me 28889 for all cells in the isEligible column below. What I am looking for is the following result:

EmployerFacilityIs Eligible
Sample EmployerSpecialists  14335
Sample EmployerPrimary Care  14335
Sample EmployerPharmacy14335
Sample EmployerOutpatient14335
Sample EmployerInpatient14335
Sample EmployerDirect Primary14335
Sample EmployerTotal14335
Sample 2 Specialists10524
Sample 2 Primary Care10524
Sample 2 Pharmacy10524
Sample 2 Outpatient10524
Sample 2 Inpatient10524
Sample 2 Direct Primary10524
Sample 2 Total10524
Sample 3Specialists4030
Sample 3Primary Care4030
Sample 3Pharmacy4030
Sample 3Outpatient4030
Sample 3Inpatient4030
Sample 3Direct Primary4030
Sample 3Total4030

Does that help? Any thoughts? I thought I had gotten fairly decent at set analysis but this one is stumping me...

Thanks

Eric

chematos
Specialist II
Specialist II

I think I was missing something.

You want to get the sum per employer? 

You only have to miss <Employer> from your expression, that has no sense in the expression, if you add a dimension, the expression will be calculated over that dimension automatically.

Have you tried this?

sum({$<Facility=,Service=,rptPeriodColonIsDPCText={'Base'}>} total isEligible)

Not applicable
Author

correct, I want to get the sum(isEligible) per employer, disregarding any selections as well as the Facility dimension. I can probably remove the Service from this example but it is useful in my real world use case.

I tried what you just suggested -

sum({$<Facility=,Service=,rptPeriodColonIsDPCText={'Base'}>} total isEligible)

and it returns the sum(isEligible) across all employers, not the specific...

again, I appreciate your thoughts / help on this. It does seem like i should be able to remove Employer from the expression entirely, given that it is in the dimension, but that isn't happening

CELAMBARASAN
Partner - Champion
Partner - Champion

Did you checked with Sum({1} isElligible) ?

If not you can check with it..

chematos
Specialist II
Specialist II

Could you upload your file or an example to use? That would be usefull...

Try this:

aggr(sum({$<Facility=,Service=,rptPeriodColonIsDPCText={'Base'}>} total isEligible), Employer)

Regards

MayilVahanan

HI

I think,

This expression helps, avoid any selection and sum the isEligible for 'Base' only..

= sum({1<rptPeriodColonIsDPCText={'Base'}>} isEligible)

Hope it helps


Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.
Not applicable
Author

Hi all, so far, despite all the help, it's still not working. A couple of suggestions return the same result set as my original expression, which is less than the expected sum.  In order to problem solve further, I'm going to dig in more and try to find a few specific rows that should be showing up but is not.

Thanks for the help and I'll let everyone know what I find. If I still can't figure it out, I'll post the QVW and see if someone else can solve this brain teaser.

Eric

CELAMBARASAN
Partner - Champion
Partner - Champion

Can you provide information about the links between Employer , isEligible and Facility?