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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
FrancisGhao
Frequent Visitor

Check object in many table whether it is in masterdata table

Hi All,

 

I have a transaction table called "Activities" and a Master data table called "projects".

 

Sometimes new projects are added in the activities table and I need to know so I can update the master data table. In the example. I added project 8 in activities table.

 

Approach:

Created new table

Find new addition = DISTINCT(Activities[ProjectName])

The following fomula gives me number of transactions in activities table.

The other around = SUMX('Activities', FIND('Find new addition'[ProjectName],'Activities'[ProjectName],,0))

 

What I would like to see is a boolean (true/false) whether project X is in the master data. So far, youtube tutorials are working from the one-side table. So I dont know the approach when working in the many table. Or is it not recommended? If so, how should I tackle it?

 

Link file

1 ACCEPTED SOLUTION
v-jingzhang
Community Support
Community Support

Hi @FrancisGhao 

 

You can add the following column in 'Find new addition' table. 

Column 2 = IF('Find new addition'[ProjectName] IN VALUES(ProjectList[ProjectName]),TRUE(),FALSE())

vjingzhang_0-1672293159313.png

 

Best Regards,
Community Support Team _ Jing
If this post helps, please Accept it as Solution to help other members find it. Highly appreciate your Kudos!

View solution in original post

4 REPLIES 4
v-jingzhang
Community Support
Community Support

Hi @FrancisGhao 

 

You can add the following column in 'Find new addition' table. 

Column 2 = IF('Find new addition'[ProjectName] IN VALUES(ProjectList[ProjectName]),TRUE(),FALSE())

vjingzhang_0-1672293159313.png

 

Best Regards,
Community Support Team _ Jing
If this post helps, please Accept it as Solution to help other members find it. Highly appreciate your Kudos!

Thank you! It is working as intended

amitchandak
Super User
Super User

@FrancisGhao ,

A new column in the projects

 

new =

var _cnt = countx('Find new Addition','Find new Addition'[Project] = project[project]) ,'Find new Addition')

return 

if(isblank(_cnt), "New", "Old")

 

 

refer 4 ways (related, relatedtable, lookupvalue, sumx/minx/maxx with filter) to copy data from one table to another
https://www.youtube.com/watch?v=Wu1mWxR23jU
https://www.youtube.com/watch?v=czNHt7UXIe8

 

I added a new column in the project table. 

The formula gave an error. The last expression of countX is not recognized.

here is the Link to the file

 

 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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