8 Replies Latest reply: Mar 22, 2016 3:19 AM by Kuldeep Choudhary

# Convert expression to set analysis

Hi all I am facing a problem. A chart on the access point gives an error "Calculation timed out", I want to reduce the complexity of the below expression by converting it to set analysis, please help:

Expression:

=if(Aggr(num(Rank(Count(DISTINCT if(Newdate>vmaxdate14 and Newdate<=vmaxdate7, starttime)),4)), employee_id)<=20,
Aggr(num(Rank(count(DISTINCT if(Newdate>vmaxdate14 and Newdate<=vmaxdate7, starttime)),4)), employee_id),'New ')

• ###### Re: Convert expression to set analysis

may be try

=alt( Count (distinct {< emp_id={"=rank(count({<NewDate={">\$(=vmaxdate14 )<\$(=vmaxdate7)"}>}emp_id),4)<=20"}>}emp_id),'New')

• ###### Re: Convert expression to set analysis

Hi Kush,

The query does not work, it gives blank values.

• ###### Re: Convert expression to set analysis

Hi Kush,

Can you help me with this query:

=aggr(count(DISTINCT if(Newdate>vmaxdate7, starttime)),employee_id)

I am trying to reduce the complexity of other queries to avoid the error

• ###### Re: Convert expression to set analysis

Your expression looks complex and without looking at your sample it will be difficult to give you correct set expression. Request you to please share the sample application

• ###### Re: Convert expression to set analysis

That's a calculated dimension in your chart, right?

Any other dimensions / expressions in this chart that might cause a lot of calculation time?

• ###### Re: Convert expression to set analysis

Both the above listed queries are expression in chart. There is no calculated dimension in chart the dimension I am using 7 dimensions and 4 expressions. The expressions are listed below:

aggr(count(DISTINCT {<Newdate = {>vmaxdate7}>starttime}),employee_id

=Count(DISTINCT if(Newdate>=vmaxdate14 and Newdate <= vmaxdate7, starttime))

=if(Aggr(num(Rank(Count(DISTINCT if(Newdate>vmaxdate14 and Newdate<=vmaxdate7, starttime)),4)), employee_id)<=20,Aggr(num(Rank(count(DISTINCT if(Newdate>vmaxdate14 and Newdate<=vmaxdate7, starttime)),4)), employee_id),'New ')

=FirstSortedValue(distinct [PII Type],-aggr(count( if(not IsNull(NewHour1) and not IsNull([PII Type]),QueryKey)),[PII Type],employee_id))

• ###### Re: Convert expression to set analysis

Hi,