Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
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
tamilarasu
Champion
Champion
Author

Hi Daniel,

As I said already, Emp ID key in Qc table is belongs to the QC persons. We can take the QC count from QC table and match the worked by name with the Emp Name from productivity table. Is there any possibility?

I guess, I haven't clearly explained my doubt.very-sad-smiley-emoticon.gif

ToniKautto
Employee
Employee

Here is my example for the screenshot. Notice that I have linked the table over EmpName and WorkedBy. I think you should spend time on the data modelling to make sure you organize the data to represent how it relates.

As you can see by a "correct" data model you also get a lot easier expressions.

tamilarasu
Champion
Champion
Author

Thanks a lot Toni. But sorry to say, I can not edit data model as it was already built. The table is linked with date key. Please see above attachment names as "QComm". Could you provide me front end solution.!!

danieloberbilli
Specialist II
Specialist II

I think it is as I said - it depends on your dimension and what field you count:

in this example I show the dimension of QC and count a field from QC whereas the Productivity-reference is in the p() function

tamilarasu
Champion
Champion
Author

Thank you for your time Daniel. My dimension is Productivity.EmpName (Its already defined) and I tried the below expression. But the count is wrong.

=count({<[Productivity.EmpName]=P([QC.Worked by])>} [QC.Worked by])

danieloberbilli
Specialist II
Specialist II

Then I dont think that this is possible -if you are not 'allowed' to change the object, try add another table next to it / or show with button on/off 

Not applicable

Hi Tamil,

try this you will get little idea.

=count(DISTINCT{<[Productivity.EmpName]=P([QC.Worked by])>} EmpID)

ToniKautto
Employee
Employee

Keep in mind that if the EmpID in the two tables do not refer to the same person, your link will simply not reflect the truth. In this small example there is no single value that links, so the link it self is misleading.

ToniKautto
Employee
Employee

Agree with Daniel. Either your object has unsuitable setup for your purposes, or your data model does not match the business reality. I do not see that we can help you resolve this since the data does not match your expectations.

tamilarasu
Champion
Champion
Author

Toni and Daniel: In that is the case, we can skip the above issue. I just want to know whether the below can be achieved through expression.

Capture.PNG

Sorry to bother you again on this.bored-expression-smiley-emoticon.gif