2 Replies Latest reply: Oct 24, 2012 7:39 AM by Helen Pippard

# 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

• ###### Re: 2 Set analysis in 1 expression

try:

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

• ###### 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