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: 
tamilarasu
Champion
Champion

Possible Selection?

Hello,

I have two tables and uploaded from two excel files and both linked with Emp Id key. The table names are Productivity and Qc. Now, I want to get the qc count for the employee whose name present in productivity. I have tried like below but unable to get the result.

count({<Productivity.EmpName=P(QC.WorkedBy={'$(Productivity.EmpName)'})>}EmpID)

Please see the attachment and provide the solution please.

24 Replies
danieloberbilli
Specialist II
Specialist II

I might be wrong, but I dont think that is possible.

I would do this in the script: distinct load of all employees. Then for each table I would create a new table with the count of all the employees grouped by employees and match both to the first (reference) table.

danieloberbilli
Specialist II
Specialist II

sorry - that was a bit short - I just want to say there are several ways to achieve it, but it needs a bit either of scripting or of the 'right' chart object regarding the dimension

ToniKautto
Employee
Employee

All expressions are calculated over the dimension. There needs to be a natural relation between the data your are attempting to aggregate over. For example value B in one field is not logically equal to B in an other field, they need to be logically associated in the data model.

The only way to get your result in this limited sample is to rearrange the relation, as I suggested previously. I do not think this rearrangement as such is a problem, as it actually ties the tables together in a fully logical way by using the EmpName field. Linking over EmpID simply does not appear to be correct in this case. As long as your data model is not optimal or correct the aggregation will be a bit unreliable.

Re: Possible Selection?

tamilarasu
Champion
Champion
Author

thank-you.gifDaniel and Toni.. I'll alter the data model. Have a nice day and weekend!!

tamilarasu
Champion
Champion
Author

Hi Snop,

Thanks for the reply. I have tried and the count is 1 (Which is wrong) for all employees.