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 Community,
I am looking for help for the below scenarios; I want to achieve in Power Query.
I want to keep or remove rows based on the "Lookup Table." values.
***Requirements
If the lookup table's "fiscal product" column value is available in any of the three tables, I want to keep that value. Otherwise, I want to filter out nonmatching values from tables.
Solved! Go to Solution.
Did you know that you can merge on multiple columns? Do a left anti join between your fact tables and the reference table based on all original key columns.
Fact table:
Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WMlHSUUpUitWBsJLALFO4mClELBYA", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [year = _t, product = _t])
Exclusion table:
Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WMlXSUUpUio0FAA==", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [year = _t, product = _t])
Result table:
Table.NestedJoin(Fact, {"year", "product"}, Exclusion, {"year", "product"}, "Exclusion", JoinKind.LeftAnti)
Did you know that you can merge on multiple columns? Do a left anti join between your fact tables and the reference table based on all original key columns.
Fact table:
Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WMlHSUUpUitWBsJLALFO4mClELBYA", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [year = _t, product = _t])
Exclusion table:
Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WMlXSUUpUio0FAA==", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [year = _t, product = _t])
Result table:
Table.NestedJoin(Fact, {"year", "product"}, Exclusion, {"year", "product"}, "Exclusion", JoinKind.LeftAnti)
please state your question again, "i want to filter out nonmatching values from tables" is not clear.
Thank you so much for attending to my questions @lbendlin
[please state your question again, "I want to filter out nonmatching values from tables" is not clear.]
***If values match the lookup table "final product" column; then I want to keep that row—otherwise, I want to filter out that rows.Example: If Fiscal 04, I want to filter(remove that rows) the final product value (5-ABC), but if Fiscal 05, then (5-ABC) should stay.Let me know if you need more information.
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.
User | Count |
---|---|
114 | |
97 | |
86 | |
70 | |
62 |
User | Count |
---|---|
151 | |
120 | |
103 | |
87 | |
68 |