PowerPivot - Searching Between Tables

ShaunP

New Member
Joined
Jul 5, 2018
Messages
10
Hi All, I'm new to PowerPivot and running into an issue with searching between 2 tables. I setup 2 tables in PowerPivot and created a relationship between them. I am trying to count the number of instances a user shows up in a specific column. The column may contain several users within the cell. I have tried a few equations and I am not having any luck. I appreciate any help you may provide.

I created the following:

Users Table
[TABLE="class: grid, width: 250, align: center"]
<tbody>[TR]
[TD]User Name[/TD]
[/TR]
[TR]
[TD]George [/TD]
[/TR]
[TR]
[TD]Paul[/TD]
[/TR]
[TR]
[TD]Mary[/TD]
[/TR]
[TR]
[TD]Oscar[/TD]
[/TR]
[TR]
[TD]Peter[/TD]
[/TR]
</tbody>[/TABLE]


Projects Table

[TABLE="class: grid, width: 500, align: center"]
<tbody>[TR]
[TD]Project[/TD]
[TD]Team Lead[/TD]
[TD]TeamMembers [/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]George[/TD]
[TD]Paul; Mary; Peter[/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD]Paul[/TD]
[TD]Oscar[/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD]George[/TD]
[TD]Mary; Paul[/TD]
[/TR]
</tbody>[/TABLE]

I created a relationship between Users [User Name] and Projects [Team Lead]. I am able to count the number of instances a User shows up in the Team Lead column.

I tried the following code to count the rows in the Projects table that contain "Paul" in the Team Member List but the result is blank.

Code:
=CALCULATE(COUNTROWS(Projects),filter(Projects, Projects[TeamMembers]="Paul"))

I used the following code just to see if I can find Paul in the Team Members column but I get an error stating column TeamMembers in table Project cannot be determined in the current context

Code:
=if(ISERROR(search("Paul",Projects[TeamMembers],1)),1,0)
 

Excel Facts

What is =ROMAN(40) in Excel?
The Roman numeral for 40 is XL. Bill "MrExcel" Jelen's 40th book was called MrExcel XL.

Forum statistics

Threads
1,223,911
Messages
6,175,327
Members
452,635
Latest member
laura12345

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top