Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Announcements
QlikView Fans! We’d love to hear from you.
Share your QlikView feedback with the product team… Click here to participate in our 5-minute survey.
Rules, plus terms and conditions, can be found here.
Not applicable

2 counts in one expression - set analysis?

Hello,

I am looking to use set analysis to count people waiting over 52 weeks from my latest run of data and show this in a text box.

I have got this far

=Max({<Run_Number = {$(=Max(Run_Number))}>}[PTL Weeks Waited])

This gets the maximum run number

=count({<[Breach graph wait band]={'52 +'}>}[Breach graph wait band])

This gets people over 52 weeks

I am looking for a way of putting these two expressions into one to only bring back all patients over 52 weeks for the latest run month only.

I have tried

=count({<Run_Number = {$(=Max(Run_Number))}>}{<[Breach graph wait band]={'52 +'}>}[Breach graph wait band])

This counts all patients over 52 weeks but ignores the run number!

This is my first post and any help would be greatly appreciated.

Thanks in advance

Mike

1 Solution

Accepted Solutions
whiteline
Honored Contributor II

Re: 2 counts in one expression - set analysis?

Add the quotes also:

=count({<Run_Number = {'$(=Max(Run_Number))'}, [Breach graph wait band]={'52 +'}>}[Breach graph wait band])

5 Replies
whiteline
Honored Contributor II

Re: 2 counts in one expression - set analysis?

Hi.

You use two sets instead of one, try this:

=count({<Run_Number = {$(=Max(Run_Number))},>}{<[Breach graph wait band]={'52 +'}>}[Breach graph wait band])

Not applicable

Re: 2 counts in one expression - set analysis?

Hey whiteline Thanks for replying so quickly,

Unfortunately this shows no data and I know there were 7 people over 52 weeks.

=count({<Run_Number = {$(=Max(Run_Number))},>}{<[Breach graph wait band]={'52 +'}>}[Breach graph wait band])

It doesnt seem to like the first comma, However if I remove the comma it continues to ignore the run number.

Thanks for looking at this for me its my first day using Qlik View and its turning out to be a long one!

MIke

whiteline
Honored Contributor II

Re: 2 counts in one expression - set analysis?

Add the quotes also:

=count({<Run_Number = {'$(=Max(Run_Number))'}, [Breach graph wait band]={'52 +'}>}[Breach graph wait band])

Not applicable

Re: 2 counts in one expression - set analysis?

Whiteline

That worked perfectly.  Thank you so much for your help today, very much appreciated.

Mike

Not applicable

Re: 2 counts in one expression - set analysis?

Whiteline

That worked perfectly.  Thank you so much for your help today, very much appreciated.

Mike

Community Browser