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
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
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.

Top Solution Authors
Top Kudoed Authors