Forum Discussion

rmahadik's avatar
rmahadik
Regular Visitor
4 years ago

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 

 

 

 

 

 

3 Replies

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

    • rmahadik's avatar
      rmahadik
      Regular Visitor

      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 ?

       

       

      • ronrsnfld's avatar
        ronrsnfld
        Icon for Super User rankSuper User

        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.