March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
I have two separate tables. One has a list of customers with related incidents and the date (some listed multiple times for multiple incidents).
I then have another table which states the movements of a customer on set dates including if they went to hospital. I need to do a look up in table 1 to say if a customer has had a fall and been to hospital within 2 days of that fall (looking up from table 2) to then return a positive value or "yes".
Solved! Go to Solution.
Hi @NikkiSavage , your easiest solution would to merge these two tables in power query. If you would copy and paste your data into the message, rather than a picture, we could show you how to do that.
If you would share your pbix, or dummy up some values in Excel both for current and expected data. Please copy and paste them into your post, rather than doing a picture, we may be able to help you, or provide a pbix.
Please read this post to get your question answered more quickly:
https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490
Let me know if you have any questions.
If this solves your issues, please mark it as the solution, so that others can find it easily. Kudos 👍are nice too.
Nathaniel
Proud to be a Super User!
Hi @NikkiSavage , your easiest solution would to merge these two tables in power query. If you would copy and paste your data into the message, rather than a picture, we could show you how to do that.
If you would share your pbix, or dummy up some values in Excel both for current and expected data. Please copy and paste them into your post, rather than doing a picture, we may be able to help you, or provide a pbix.
Please read this post to get your question answered more quickly:
https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490
Let me know if you have any questions.
If this solves your issues, please mark it as the solution, so that others can find it easily. Kudos 👍are nice too.
Nathaniel
Proud to be a Super User!
Hi
I can't seem to copy and paste pictures - it's saying I'm not allowed and then saying there is errors as my data contains html issues.
@Nathaniel_C this is the error I get...Your post has been changed because invalid HTML was found in the message body. The invalid HTML has been removed. Please review the message and submit the message when you are satisfied. Will try and start a new query with the tables
Hi @NikkiSavage , below you will find the steps to creating this solution and the pictures detailing those steps. I didn't know your level of using Power Query so this may be overly detailed. If you would prefer a third table, so that you kept your two in their original form, in the merge step, choose to save as a new table. The way the pics loaded, start from the bottom.
Let me know if you have any questions.
If this solves your issues, please mark it as the solution, so that others can find it easily. Kudos 👍are nice too.
Nathaniel
10. Final product
9. Filter
8. Added conditional column
7.Added date col
6.Filtered Rows
5. Expanded columns
4. Merged
3.Filtered rows for Hosp
2.Second table
1. First table
Proud to be a Super User!
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
125 | |
84 | |
67 | |
54 | |
43 |
User | Count |
---|---|
203 | |
106 | |
98 | |
65 | |
56 |