Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

helen_pip
Contributor II

2 Set analysis in 1 expression

Hello

Can someone help me write the correct syntax for 2 set anlysis in 1 expression

Firstly I have an expression which works fine with 1 set analysis

Expression1

=

Time(Fractile({<RunMonth = {$(=Max(RunMonth))}>}[Total Wait],0.95)/1440 , 'hh:mm')

Now I want to use the above set analysis again but with an additional set analysis and I have written it as follows:

  Expression2

=

Time(Fractile({<RunMonth = {$(=Max(RunMonth))}>}{<[Patient Admitted?]={"1"}>}[Total Wait],0.95)/1440, 'hh:mm')

However I return the same set of results as expression 1

I have tried an IF AND statement, but this seems to take ages to LOAD

Any ideas?

Thanks

Helen

1 Solution

Accepted Solutions

Re: 2 Set analysis in 1 expression

try:

Time(Fractile({$<RunMonth = {$(=Max(RunMonth))}, [Patient Admitted?]={"1"} >}[Total Wait],0.95)/1440, 'hh:mm')


talk is cheap, supply exceeds demand
2 Replies

Re: 2 Set analysis in 1 expression

try:

Time(Fractile({$<RunMonth = {$(=Max(RunMonth))}, [Patient Admitted?]={"1"} >}[Total Wait],0.95)/1440, 'hh:mm')


talk is cheap, supply exceeds demand
helen_pip
Contributor II

Re: 2 Set analysis in 1 expression

Yes, this works perfectly!  

Thanks so much! I have spent at least 1.5hours messing around with this statement and I can see that I just needed to take out the front bracket and put in a comma!

If only I knew!

Thanks

Helen

Community Browser