Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
PowerBEye1
Regular Visitor

Creating measure for count of occurrence of the value of one column in a different table.

Hi everyone,

I'm working on creating a PowerBI reporting analyzing incident data. I'm trying to calculate how many times a value in Table 1 Column 1 occurs in column 2 Table 2. I am struggling with the values that have multiple "Tactics".
Based on the tables in the screenshot I am looking for an output like below

IntialAccess2
Discovery1
Exfiltration1

 

Tables.png

 

Hopefully there is an easy answer I am not seeing.

Thanks!

1 ACCEPTED SOLUTION
v-xiaotang
Community Support
Community Support

Hi @PowerBEye1 

Please try this measure

count = CALCULATE(COUNTROWS('Table'),FILTER('Table',CONTAINSSTRING('Table'[Tactic],MAX(List[Column1]))))

result

vxiaotang_0-1669973430470.png

 

Best Regards,

Community Support Team _Tang

If this post helps, please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
v-xiaotang
Community Support
Community Support

Hi @PowerBEye1 

Please try this measure

count = CALCULATE(COUNTROWS('Table'),FILTER('Table',CONTAINSSTRING('Table'[Tactic],MAX(List[Column1]))))

result

vxiaotang_0-1669973430470.png

 

Best Regards,

Community Support Team _Tang

If this post helps, please consider Accept it as the solution to help the other members find it more quickly.

FreemanZ
Super User
Super User

@PowerBEye1 

suggest first to split the Tactic column in Table 2 into rows in Power Query. Check this:

https://learn.microsoft.com/en-us/power-query/split-columns-delimiter

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.