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,
Is it possible to do a look up in power query based off a condition?
for example I have a table I want to join in power query joining on [customer_id] but I want to add a condition:
Join on [customer_id] when [islatest] = 1
Is this possible?
Thank you!
Solved! Go to Solution.
If you duplicate the second table then merge it into the first (not creating a new table) and then disable the load (right click on the query in the editor and uncheck enable load) then your model will end with two tables as you wanted and won't load any extra data in, which might help you keep your model nice and clean!
Hope that has helped you!
Hiya - might help if you post some sample data?
Just from what you've posted, you could try filtering the second table to only show [islatest] to 1, then merging them?
If you still needed the second table with all items, you could duplicate the table, then filter it and merge on that, to preserve the original, unfiltered table in your data model.
I do still need the second table not to be filtered. i have thought of duplicating the table and merging as well but I wanted to make sure there was not another way
In PowerBI there are usually multiple ways to any solution but I think duplicating and merging would probably be the easiest approach - is there a reason you would like to avoid using that technique?
@Bizualisation no reason other then I wanted to keep it as clean as possible, but I will use that method then
@Anonymous , I have not tried but see if table.join can help https://docs.microsoft.com/en-us/powerquery-m/table-join
Bit of code here too https://radacad.com/how-to-change-joining-types-in-power-bi-and-power-query
If you duplicate the second table then merge it into the first (not creating a new table) and then disable the load (right click on the query in the editor and uncheck enable load) then your model will end with two tables as you wanted and won't load any extra data in, which might help you keep your model nice and clean!
Hope that has helped you!
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 |
---|---|
113 | |
103 | |
75 | |
66 | |
63 |
User | Count |
---|---|
142 | |
105 | |
102 | |
81 | |
68 |