Forum Discussion

NikkiSavage's avatar
NikkiSavage
Helper II
5 years ago
Solved

Lookup for multiple values within 2 table

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".

 

  • 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

4 Replies

  • Nathaniel_C's avatar
    Nathaniel_C
    Community Champion

    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

    • NikkiSavage's avatar
      NikkiSavage
      Helper II

      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.

      • NikkiSavage's avatar
        NikkiSavage
        Helper II

        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