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

Full Power BI Video 20 Hours YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
avatar user

Helpful resources

Announcements
March PBI video - carousel

Power BI Monthly Update - March 2025

Check out the March 2025 Power BI update to learn about new features.

March2025 Carousel

Fabric Community Update - March 2025

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

Top Solution Authors (Last Month)
Top Kudoed Authors (Last Month)