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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
rmahadik
Regular Visitor

Need help with Comparing primary keys of nested tables

Hi Experts,

 

I got below Decision_Table. I want prepare a comparison report of nested tables in Data_DB and Data_GT column. I am succeded in comparing rows and colums of these tables. Now

1) I want compare primary key of both tables 

2) I want to compare values in both tables

 

I'm able to achieve this individually I can compare these 2 tables seperately using merge queries and unpivot other columns to compare cell values.

However here my objective is to write a code so that all the nested tables in Decision_Table will get compare and results can be added in additional column in boolean (True or false). 

 

Please advise how can this be possible, because I feel there is no loops in M language which we can use for iterating requirements or functions also needs manual input, rather than a output of function passing to input of another function. Hence I am not sure how to achieve this.

 

Some screenshots for reference. Let me know if additional info is needed.

 

@BA_Pete @Interkoubess @syu @v-yulgu-msft 

 

rmahadik_0-1661609915606.png

 

rmahadik_2-1661610007330.png

 

 

rmahadik_1-1661609963244.png

 

3 REPLIES 3
ronrsnfld
Super User
Super User

It is difficult for me to decipher what you want from what you have posted. But, so far as your comment about  "loops in Power Query", you can effectively do that with the functions List.Generate or List.Accumulate.  You can also write recursive custom functions.

Hi @ronrsnfld,

 

Here I want to compare nested tables mentioned in columns 'Dup_Data_DB' and 'Dup_Data_GT' and istore the difference in new column (as nested table). 

 

Can you advise on how this can be done ?

 

rmahadik_0-1661864375935.png

 

No, I cannot. Your question is much to vague for me to contribute anything other than a response to your statement about looping and iteration. Perhaps someone else will be able to interpret better.

 

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.