Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Expression help

hi everyone,

I have the following expression

=aggr(if([WO Employee Code] = EmployeeCode_Sales, Sum(AbsentFlag_ISS)),EmployeeCode_Sales,EmployeeName)

I was wondering if anyone had any suggestions on how to rewrite this to make it perform better as currently it takes the chart 6min 57secs to render.

Any help would be appreciated.

Thanks

6 Replies
kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi,

     Try this.

     Sum(Aggr(sum({<[WO Employee Code] = {"=[WO Employee Code] = EmployeeCode_Sales"}>}AbsentFlag_ISS),EmployeeCode_Sales,EmployeeName))

Regards,

Kaushik Solanki

Please remember to hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!
Not applicable
Author

Hi Kaushik,

Thanks for your reply, that unfortunately doesnt work. it puts the same figure against each row. I need to to obviously calculate at row level using the name field.

Capture.JPG

The first aggr expression are the correct figures, the second is yours which is a total sum of the field against each employee.

kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi,

     Kindly upload the example document.

Regards,

Kaushik Solanki

Please remember to hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!
Not applicable
Author

Hi, attached is a sample..

I have scrambled the data apart from the fields needed.

Thanks

Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

You can't solve this with set analysis expressions. You should create a link between DiaryEvent_Sales and WorkOrder in the script. I think you need a third table for the link. If you link the tables directly you get a useless many-to-many relationship.


talk is cheap, supply exceeds demand
kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi,

     I agree with Gysbert. It is not possible with Set Analysis, you must join both the fields.

Regards,

Kaushik Solanki

Please remember to hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!