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

Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now

Reply
Anonymous
Not applicable

Apply formula iteratively

Hi,

 

I have a table (info_table) with information I need to use to create a new column in a different table (data_table). 

 

info_table

promo_namestart_dateend_date
AAA01/12/202003/12/2020
BBB05/12/202007/12/2020

 

data_table

iddate
102/12/2020
2

04/12/2020

305/12/2020

 

Resulting column, in data_table:

promo_name
AAA
None
BBB

 

My formula:

promo_name = IF(data_table[date] >= RELATED(info_table[start_date]) && data_table[date] <= RELATED(info_table[end_date]), RELATED(info_table[promo_name]), "None")

 

The problem with this formula is it just maps the first row correctly.

 

Right now I'm getting around this by creating a formula and inserting the conditions I want manually, but I'd like it to update correctly according to the different promo_names in info_table.

 

Any help will be appreciated!

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@Anonymous , Create a new column in data_table

 

new column = coalesce(maxx(filter(info_table, info_table[start_date] <=data_table[date] && info_table[end_date] >=data_table[date]),[promo_name]),"None")

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

View solution in original post

1 REPLY 1
amitchandak
Super User
Super User

@Anonymous , Create a new column in data_table

 

new column = coalesce(maxx(filter(info_table, info_table[start_date] <=data_table[date] && info_table[end_date] >=data_table[date]),[promo_name]),"None")

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

February Power BI Update Carousel

Power BI Monthly Update - February 2026

Check out the February 2026 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.