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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

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
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.

Top Solution Authors