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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
1984
Frequent Visitor

Multiple lookup

Hi

I am relatively new back to using DAX and come up against my first conundrum. I have two tables, table one being a fact table with a 'Date' column and 'Name' column, then a lookup table with 'Name' 'Start Date' and 'End Date'.

What Im looking for is to create a column on the fact table that both looks up on the lookup table for a row that matches the 'Name' and the 'Date' is between the 'Start Date' and 'End Date' and returns something like match and no match.

Can someone provide some support with this?
Thanks in advance!

1 ACCEPTED SOLUTION
wdx223_Daniel
Super User
Super User

CalculatedColumn=IF(COUNTROWS(FILTER(LookupTable,LookupTable[Name]=Table[Name]&&LookupTable[Start Date]<=Table[Date]&&LookupTable[End Date]>=Table[Date])),"Match","No Match")

View solution in original post

2 REPLIES 2
wdx223_Daniel
Super User
Super User

CalculatedColumn=IF(COUNTROWS(FILTER(LookupTable,LookupTable[Name]=Table[Name]&&LookupTable[Start Date]<=Table[Date]&&LookupTable[End Date]>=Table[Date])),"Match","No Match")

Thank you @wdx223_Daniel !

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel1

Power BI Monthly Update - May 2024

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

Top Solution Authors
Top Kudoed Authors