powerbi - 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]))
解决方案
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.
推荐阅读
- python - 如何用nan绘制直方图?
- angular - 测试三元运算符(Angular)
- android - 启动活动后登录活动崩溃
- bash - 命令替换bash中没有这样的文件错误
- c# - 如何在 EF Core 中使用自定义迁移实现“如果存在更新”?
- java - 在命令行上运行时出现 ClassNotFoundException 但在 IntelliJ IDEA 上运行良好
- jquery - 当元素离开屏幕时如何修复窗口正在调整大小
- c# - Color.GetHue()、Color.GetBrightness()、Color.GetSaturation() 似乎没有提供正确的值
- python - 将 Keras 模型导出为 TF Estimator:找不到经过训练的模型
- macos - 在 macOS 上重定向端口和 ip