The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.
Hi,
I have a table with order lines that have duplicated order ID if a order as multiple purchased products.
i would like to flag order lines that have a certain products (column B) for the same order ID (column A)
Would you be able to help?
thx a bunch!
Solved! Go to Solution.
Hello - this is how you can do it. This example is returning true in the new column "Multi-Line and Contains Diamond" if there is more than one row of the same product category and if the product name contains the word diamond.
Table.AddColumn ( #"Changed Type", "Multi-Line and Contains Diamond", let ProductCategory = #"Changed Type"[Product Category] in (x) => Text.Contains ( x[Product], "diamond", Comparer.OrdinalIgnoreCase ) and List.Count ( List.Select ( ProductCategory, each _ = x[Product Category] ) ) > 1, type logical )
Hello - this is how you can do it. This example is returning true in the new column "Multi-Line and Contains Diamond" if there is more than one row of the same product category and if the product name contains the word diamond.
Table.AddColumn ( #"Changed Type", "Multi-Line and Contains Diamond", let ProductCategory = #"Changed Type"[Product Category] in (x) => Text.Contains ( x[Product], "diamond", Comparer.OrdinalIgnoreCase ) and List.Count ( List.Select ( ProductCategory, each _ = x[Product Category] ) ) > 1, type logical )