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.
Hello there,
The business problem is that I download a table from shopify where I have the order with all the items that are in that order. The problem is that orders that has (in this case) the Product 'bbbb' need to be handle different with all the products in that order.
In this case this the comple table
And this is the table that I need at the end where only order 1 and 4 has product 'bbbb'
I tried with data nesting and some filters but to be honest I am not very good with powerquery and M lenguage. My plan B is Macros or Array formulas in Excel but I prefer to learn something new with power query.
Solved! Go to Solution.
Hello, @luigiPulido_
let
Source = your_table,
orders = Table.SelectRows(Source, (x) => x[Product] = "bbbb")[Order],
z = Table.SelectRows(Source, (x) => List.Contains(orders, x[Order]))
in
z
Hello, @luigiPulido_
let
Source = your_table,
orders = Table.SelectRows(Source, (x) => x[Product] = "bbbb")[Order],
z = Table.SelectRows(Source, (x) => List.Contains(orders, x[Order]))
in
z
Yes, thats exactly what I was looking for. Thanks, I just need to understand whats going on LOL
@luigiPulido_ well, first Table.SelectRows gives you all rows that contain "bbbb" in Product column. Little touch of [Order] after closing bracket gives us a list of order numbers in that table. You may clearly see this list in PQ editor. Then (step z) we filter original tables' orders column. That is all about Table.SelectRows, columns as lists of items, working with lists functions etc.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.