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! Learn more

Reply
Anonymous
Not applicable

new column based on if date is between two dates then fill with text

Hi all, 

 

first post here. I dont know if it is possible with PBI but i have two tables:

 

Table 1:

[SERVICE_DATE] [New Column]

 

Table 2:

[DATE1] [DATE2] [TEXT MESSAGE]

 

I am looking to fill the [NEW COLUMN] in Table 1 with the [TEXT MESSAGE] from table 2 if [SERVICE_DATE] is equal to or between [DATE1] and [DATE2]. 

 

im lost and have tried a couple of different options with zero sucess. 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

HI @Anonymous,

You can use the following calculated column formula in table1 if it suitable for your requirement:

formual =
CONCATENATEX (
    FILTER (
        Table2,
        Table2[DATE1] <= EARLIER ( Table1[SERVICE_DATE] )
            && Table2[DATE2] >= EARLIER ( Table1[SERVICE_DATE] )
    ),
    [TEXT MESSAGE],
    ","
)

Regards,

Xiaoxin Sheng

View solution in original post

1 REPLY 1
Anonymous
Not applicable

HI @Anonymous,

You can use the following calculated column formula in table1 if it suitable for your requirement:

formual =
CONCATENATEX (
    FILTER (
        Table2,
        Table2[DATE1] <= EARLIER ( Table1[SERVICE_DATE] )
            && Table2[DATE2] >= EARLIER ( Table1[SERVICE_DATE] )
    ),
    [TEXT MESSAGE],
    ","
)

Regards,

Xiaoxin Sheng

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