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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
qmestu
Helper III
Helper III

Counting number of ocurrences of one value of a table in another table

Hi,

 

I've encountered this issue and have yet to find a way to fix it. I'll exemplify with 2 tables:

 

table A:

A2020
B2021
C2020
D2022

 

table B:

A2020
A2019
A2018
B2021
C2020
C2019

What i'm looking for is a way to count the number of ocorrences of A,B,C,D on the 2nd table where the year is not equal to the year registered in the 1st table. Both tables are connected through a many to many relationship.

 

This measure should yeld the following results:

 

A=2

B=0

C=1

D=0

 

Thank you in advance.

1 ACCEPTED SOLUTION
ThxAlot
Super User
Super User

ThxAlot_1-1704997365651.png



Expertise = List.Accumulate(


        {Days as from Today},


        {Skills and Knowledge},


        (Current, Everyday) => Current & Day.LearnAndPractise(Everyday)


)



View solution in original post

1 REPLY 1
ThxAlot
Super User
Super User

ThxAlot_1-1704997365651.png



Expertise = List.Accumulate(


        {Days as from Today},


        {Skills and Knowledge},


        (Current, Everyday) => Current & Day.LearnAndPractise(Everyday)


)



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.

Top Solution Authors
Top Kudoed Authors