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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Anonymous
Not applicable

Need help in creating a new table using DAX

I have two tables.

Table 1

Part Id, created date, region

 

Table 2

Tender id, Tender date, region

 

Now the above two tables has many to many relationship and has no dependency between themselvs. I want to create a new table with data from this two tables into one with below clause tender date < Part created date < tender date + 7

2 ACCEPTED SOLUTIONS
amitchandak
Super User
Super User

@Anonymous , Try like

filter(crossjoin(Table1,table2),[tender date]<[Part created date] && [Part created date]<=[tender date]+7)

As both region has same name, you might have to use selectcolumns to rename

 

Or like
summarize(filter(table1,table1[Tender date]<=max(Table2[Part created date]) && max(Table2[Part created date])<=table1[tender date]+7)
,Table1[part_id], table2[tendar_id], table1[region])

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

Anonymous
Not applicable

Thanks @amitchandak  .. This worked.

View solution in original post

3 REPLIES 3
Anonymous
Not applicable

Why not do it in Power Query? This is the place where such calculations really belong.

Best
D
amitchandak
Super User
Super User

@Anonymous , Try like

filter(crossjoin(Table1,table2),[tender date]<[Part created date] && [Part created date]<=[tender date]+7)

As both region has same name, you might have to use selectcolumns to rename

 

Or like
summarize(filter(table1,table1[Tender date]<=max(Table2[Part created date]) && max(Table2[Part created date])<=table1[tender date]+7)
,Table1[part_id], table2[tendar_id], table1[region])

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
Anonymous
Not applicable

Thanks @amitchandak  .. This worked.

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

Find out what's new and trending in the Fabric community.

July PBI25 Carousel

Power BI Monthly Update - July 2025

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