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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Anonymous
Not applicable

Get Limit value from table 2 by comparing date from table 1

Hi,

I have 2 tables like below:

 

Onkar__22_0-1690179236849.png

 

Onkar__22_1-1690179267927.png

 

I want to ftech the limit1, limit2, limit3 by comparing date & Site Name from table 1 with date range in table 2.

i.e. It should check the date range in which the date fits; also, if the site name matches, return the values from that row.

1 ACCEPTED SOLUTION
sanalytics
Super User
Super User

Hello @Anonymous 

 

Assuming you want to compare Table1[Date] with Table2[StartDate] and Table2[EndDate] range.

If it is then please get the below solution

Create a calculated column by writing below DAX

Limit 1 =
CALCULATE(
    MAX( Table2[Limit1] ),
    FILTER(
        Table2,
        Table1[SiteName] = Table2[SiteName] &&
        Table1[Date] >= Table2[StartDate] &&
        Table1[Date] <= Table2[EndDate]
    ) )
 
Please find the below screenshot
sanalytics_0-1690181673696.png

 

Hope it will help you.

 

Regards

sanalytics

If it is your solution then please like and accept it as solution

 

 

 

View solution in original post

3 REPLIES 3
sanalytics
Super User
Super User

Hello @Anonymous 

 

Assuming you want to compare Table1[Date] with Table2[StartDate] and Table2[EndDate] range.

If it is then please get the below solution

Create a calculated column by writing below DAX

Limit 1 =
CALCULATE(
    MAX( Table2[Limit1] ),
    FILTER(
        Table2,
        Table1[SiteName] = Table2[SiteName] &&
        Table1[Date] >= Table2[StartDate] &&
        Table1[Date] <= Table2[EndDate]
    ) )
 
Please find the below screenshot
sanalytics_0-1690181673696.png

 

Hope it will help you.

 

Regards

sanalytics

If it is your solution then please like and accept it as solution

 

 

 

Anonymous
Not applicable

Thanks @sanalytics 🙂

@Anonymous 

Glad, it worked. Would appreciate if you like the solution.

 

Regards

sanalytics

 

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors