Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

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 ')

8 Replies
Kushal_Chawda

may be try

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

Not applicable
Author

Hi Kush,

The query does not work, it gives blank values.

Not applicable
Author

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

swuehl
MVP
MVP

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

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

Not applicable
Author

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))

Kushal_Chawda

Please share a sample to answer your query more quickly

Kushal_Chawda

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

Not applicable
Author

Hi,

Can you please share your app please?

Regards,

KC