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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
rpinxt
Impactful Individual
Impactful Individual

Find lines that have a value in a specific field that is not in the Master Data table.

Well I have done this before and now have to recreate it but I do not know anymore how I did it!

 

Strange this that the solution shows like a table but there is no logic.

So here is the table:

rpinxt_0-1714401664093.png

But as you can see in the formula bar there is nothing.

What this does is look in the main data for a field PF.

Then it compares it to a master data table in the model that also has field PF.

 

When in the new data it finds a value for PF that is not in the master data table it will list these lines in this CrossRefCheck table.

Only bit of logic I can find is in query editor:

rpinxt_1-1714401880257.png

So here in the query editor you see all tables involved.

AgeingDetails is the new data coming in, PF is the master data against which the new data is checked.

Then CrossRefCheck is the table that gets created by this little logic.

 

But how was it setup?? Cannot find a new table option in query editor.

 

2 ACCEPTED SOLUTIONS

Hi @rpinxt ,

You can follow the steps below to get it:

1. Navigate to Power Query Editor,  Click New Source--> Blank Query to create a new query and rename this query as "CrossRefCheck"

vyiruanmsft_0-1714463953484.png

2. Select the above query and click "Advanced Editor" in Home ribbon. Paste the codes in it just as the one in below screenshot

vyiruanmsft_1-1714464197069.png

Best Regards

Community Support Team _ Rena
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Yes thanks @v-yiruan-msft I also found the blank query.

Can do it like you did in advance editort.

But I just did it in the normal formula line:

rpinxt_0-1714466781885.png

Work also just fine.

Thanks.

View solution in original post

4 REPLIES 4
rpinxt
Impactful Individual
Impactful Individual

Well thanks @v-yiruan-msft but there is just the code that I already saw:

rpinxt_0-1714459251675.png

 

But how did I make this. Where did it start.

I was not done by addiing a new table:

rpinxt_1-1714459328299.png

 

So where do you put that source code in??

Source = Table.RemoveMatchingRows(AgingDetails,Table.ToRecords(PF),{"Prod.Fam."})

 

Where to create this table.removematchingrows logic ?

 

Hi @rpinxt ,

You can follow the steps below to get it:

1. Navigate to Power Query Editor,  Click New Source--> Blank Query to create a new query and rename this query as "CrossRefCheck"

vyiruanmsft_0-1714463953484.png

2. Select the above query and click "Advanced Editor" in Home ribbon. Paste the codes in it just as the one in below screenshot

vyiruanmsft_1-1714464197069.png

Best Regards

Community Support Team _ Rena
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Yes thanks @v-yiruan-msft I also found the blank query.

Can do it like you did in advance editort.

But I just did it in the normal formula line:

rpinxt_0-1714466781885.png

Work also just fine.

Thanks.

v-yiruan-msft
Community Support
Community Support

Hi @rpinxt ,

You can go to Power Query Editor, select the query [CrossRefCheck]. The Advanced Editor lets you see the code that Power Query Editor is creating with each step. Please navigate to Home ribbion and click "Adavanced Editor" to open the page.

vyiruanmsft_0-1714444452903.png

Best Regards

Community Support Team _ Rena
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

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.