Reputation: 8144
Not quite sure how to word this question, but I'll explain here:
I have a table that looks like this:
User | Credits | Tasks |
---|---|---|
John | 100 | 5 |
Sam | 50 | 3 |
These values are all coming from one table called taskbin
.
I'm trying to add a column that looks up the count of rows with the user in a separate table called qabin
.
The qabin
table looks like this
QAID | Submitter | QAer |
---|---|---|
20 | John | Sam |
21 | Sam | John |
Basically, I need to get a count of the number of times John
appears in the Submitter
field of the qabin
table.
I could add it to the table view so it looks like this:
User | Credits | Tasks | Submitted Count |
---|---|---|---|
John | 100 | 5 | 1 |
Sam | 50 | 3 | 1 |
I tried just adding a count of submitter to the table view, but it shows the total number of rows instead of using the correct user as listed in the table.
Any help is appreciated.
Upvotes: 2
Views: 748
Reputation: 4282
If these two tables are not connected for some reason
Column =
CALCULATE (
COUNTX (
FILTER ( qabin, qabin[Submitter] = CALCULATE ( MAX ( taskbin[User] ) ) ),
qabin[Submitter]
)
)
Upvotes: 1
Reputation: 1325
If you Join taskbin to qabin table on the user, you can show the "User" value from taskbin and do a measure that counts the rows in qabin, in a table. Something like this might work
Submitted Count = CountRows('quadmin').
Upvotes: 2