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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
김기만
Frequent Visitor

DAX Join Error When Using Related Tables

We are going to attempt a JOIN between the two tables below in Power BI.
The goal of calculation is to be able to check by time zone in the view table as the time zone appropriate for each type through JOIN between the two tables.

 

'DIM_SCHEDULE' table example
[TYPE] [START] [END] [Status] → (Work status)
Type1 | 09:00 | 10:30 |True
Type1 | 10:30 | 10:40 | False
Type1 | 10:40 | 12:00 | True
Type1 | 12:00 | 13:00 | False
Type1 | 13:00 | 15:00 | True
Type2 | 09:00 | 10:30 |True
Type2 | 10:30 | 10:40 | False
Type2 | 10:40 | 12:00 | True
Type2 | 12:00 | 13:00 | False
Type2 | 13:00 | 15:00 | False
Type3 | 00:00 | 00:00 | False


'VIEW_SOMEONE' table example
[ProdNum] [Date] [WType] [INPUT] [OUTPUT]
Product_1 | 23-01-02 | Type1 | (DateTime) | (DateTime)
Product_1 | 23-01-03 | Type1 | (DateTime) | (DateTime)
Product_2 | 23-01-03 | Type1 | (DateTime) | (DateTime)
Product_2 | 23-01-04 | Type1 | (DateTime) | (DateTime)
Product_3 | 23-01-03 | Type2 | (DateTime) | (DateTime)
Product_3 | 23-01-04 | Type1 | (DateTime) | (DateTime)
Product_3 | 23-01-01 | Type2 | (DateTime) | (DateTime)

 

There are two tables like above.

 

DIM's Type and VIEW's WType are the same text. The two tables are connected in a many-to-many relationship with each type. After the matching rows, I would like to increase the rows and columns of data for each time zone of the DIM corresponding to each type.

However, both the NATURALLEFTOUTERJOIN and NATURALINNERJOIN functions do not work. I get an error saying a common join column is required.
This does not work whether the table names of the two connected columns are the same or not. What is the cause of this problem and is there a solution?

2 REPLIES 2
amitchandak
Super User
Super User

@김기만 , You can use expression function for that

 

New column in Table 2

Maxx(filter(Table1, Table1[Type] = Table2[Wtype] && Timevalue(Table2[DateTime]) > =Table1[Start] &&  Timevalue(Table2[DateTime]) < =Table1[End] ) , [Status]) 

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

Thanks for your answer.

I tried applying your answer, but I only get an Error.

Like the first table, even in one type, data exists in different columns for each time zone. Therefore, it is necessary to be able to express it by adding a table for each date of the day, and an action such as Join is needed to increase the column while joining the table and increase the rows that meet the conditions enough to express Table2 in detail by time.

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.