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

Be 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

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

Join us as experts from around the world come together to shape the future of data and AI!
At the Microsoft Analytics Community Conference, global leaders and influential voices are stepping up to share their knowledge and help you master the latest in Microsoft Fabric, Copilot, and Purview.
️ November 12th-14th, 2024
 Online Event
Register Here

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.