Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

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.

Reply
NikkiSavage
Helper II
Helper II

Assistance with look up value with variable and multiple dates

I have two tables. One contains data including customer number and whether they have had a fall and if so, on what dates they have had a fall. As such, it can contain multiple rows for one customer if they have had multiple falls. The other tells me if a customer has been to hospital any number of times so also has multiple rows for one customer. I want to do a look up in the first table which will tell me if a customer has been to hospital within 2 days of having a fall.

1 REPLY 1
amitchandak
Super User
Super User

@NikkiSavage , Need sample data for that.

example

New column =

var _cnt = countx(Table2, Table2[Customer] = Table1[Customer] && Table2[Date] >= Table1[Date]  && Table2[Date] <= Table1[Date] +2),Table2[Customer] ) +0

return 

if(_cnt>0, True(), False())

 

refer 4 ways to copy data from one table to another
https://www.youtube.com/watch?v=Wu1mWxR23jU
https://www.youtube.com/watch?v=czNHt7UXIe8

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors