首页 > 解决方案 > How to perform NATURALLEFTOUTERJOIN without having the same name in both tables?

问题描述

I tried to make same column in both tables but end up receiving error "An incompatible join column, (''[WeekName]) was detected. 'NATURALLEFTOUTERJOIN' doesn't support joins by using columns with different data types or lineage".

LeftOuterJoin = NATURALLEFTOUTERJOIN(
   SELECTCOLUMNS(GROUPBY(DateTime,DateTime[yDayFullName],
      "WEEKCOUNT", COUNTX(CURRENTGROUP(),DateTime[yDayFullName])),
      "WeekName", DateTime[yDayFullName], "WEEKCOUNT",[WEEKCOUNT]),
  SELECTCOLUMNS(GROUPBY(FILTER(Mergetable,Mergetable[noShow]<>"true"),Mergetable[WeekDayName],
      "TOTALDURATION", SUMX(CURRENTGROUP(),Mergetable[MeetingDurationInHours])),
      "WeekName",Mergetable[WeekDayName],"TOTALDURATION",[TOTALDURATION]))

标签: powerbidax

解决方案


Can you please change the code to following and see if it works

"WeekName", DateTime[yDayFullName]&"" and

"WeekName",Mergetable[WeekDayName]&""

Also, please make sure that DateTime[yDayFullName] and Mergetable[WeekDayName] has the same data type.

I have assumed that both of them are string and I guess you are trying to join on WeekName.


推荐阅读