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
anmsharma
Helper II
Helper II

Checking the Data in a definite interval and adding the value in Column

Hi Team,

 

I have a requirement that a particular 'Date' needs to be checked if it lies between 'FromDate' and 'ToDate'.

 

If yes, then I need to have separate column as 'NewDate' which will have the value of 'Date' in true condition else ' ' in false.

 

'FromDate' and 'ToDate' is in table 1 and 'NewDate' need to be added in table 1 only

'Date' is in table 2

 

Many Thanks in advance,

Anmol

1 ACCEPTED SOLUTION
Anonymous
Not applicable

@anmsharma,

Create relationship as other post, then create the column using the Dax below.

NewDate = IF(RELATED(Table2[Date])<=Table1[Todate]&&RELATED(Table2[Date])>=Table1[FromDate],RELATED(Table2[Date]),BLANK())

Regards,
Lydia

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

@anmsharma,

Create relationship as other post, then create the column using the Dax below.

NewDate = IF(RELATED(Table2[Date])<=Table1[Todate]&&RELATED(Table2[Date])>=Table1[FromDate],RELATED(Table2[Date]),BLANK())

Regards,
Lydia

Salvador
Responsive Resident
Responsive Resident

Hi,

 

I'd say you first would need to establish a relationship between both tables (if you dont have it already), and then create a column with an or/if, in table 1, something like
        = or(if(table1[date]<table2[datex];table1[date];"");if(table1[date]>table2[datey];table1[date];""))

 

Regards, 

Salva.

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