2 Insane Power Query Tricks
- V E Meganathan
- 19 hours ago
- 1 min read
š Checking if Two Lists Are Identical in Power Query M:
When working with lists in Power Query, you often need to verify whether two lists are exactly the same.
Here is an approach:
L1 = {2,10,25,35},
L2 = {2,10,25,35},
Result = L1 = L2 // true

ā Simple and direct.
ā Works when both lists have the same elements in the same order.
Result = List.IsEmpty(List.RemoveItems(L1,L2))
⢠Removes all items in L2 from L1.
⢠If nothing remains, lists are identical.
⢠Order doesnāt matter, but duplicates can affect results.
Result = List.IsEmpty(List.RemoveMatchingItems(L1,L2))
⢠Removes items from L1 that exactly match items in L2.
⢠Also returns true if lists are identical.
š§© Power Query Tip: Assign Data Types with the Fourth Argument in Table.AddColumn
When adding new columns in Power Query, we often focus on the transformation logic.
But did you know the fourth argument in Table.AddColumn lets you directly assign a data type to your new column?

Result = Table.AddColumn(Source, "Percentage", each [Value] / [Total], Percentage.Type)
⨠With this approach, you donāt need a separate Table.TransformColumnTypes step ā the column is created with the correct type right away!





Comments