Forum Discussion

MagikJukas's avatar
MagikJukas
Resolver III
3 years ago
Solved

Table.Select multi conditions

Hi,

I have a table that I am trying merge into the same table with some specific conditions

 

Table contains:

  • Father
  • Components
  • Level
  • Index

First I merged based one into the other:

= Table.NestedJoin(#"Filtered Rows", {"Father"}, #"Filtered Rows", {"Father"}, "MergedTable", JoinKind.LeftOuter)

 

NowI want to select only those rows that have:

 

  • Index from MergedTable< Index 
  • Level from MergedTable= Level - 1

 

Any tips how to achieve it?

 

thanks

 

 

  • = Table.AddColumn(#"Merged Queries", "Custom", each Table.SelectRows([MergedTable], 
    (Magic) =>
    (Magic[Index]<[Index]) and
    (Magic[Level]=([Level]-1))))

1 Reply

  • = Table.AddColumn(#"Merged Queries", "Custom", each Table.SelectRows([MergedTable], 
    (Magic) =>
    (Magic[Index]<[Index]) and
    (Magic[Level]=([Level]-1))))