Taken by itself, NATURALINNERJOIN seems to work in the following definition:
The scenarioes in which NATURALINNERJOIN will produce results at all, are very limited...
But the following UNION definition is currupted somehow:
Column headings are plain wrong, and it is not just in the Table View...
Suspect NATURALINNERJOIN to be the culprit. I'm using Desktop version 2.51.4885.701 64-bit (oktober 2017).
5 Comments
- v-qiuyu-msft
Community Support
Hi Dag,
With UNION() function, the column names in the return table will match the column names in table_expression1. From the second image, the return table will have the column name Spend rather than Cost.
By the way, to do join or union operations, you can do it in Query Editor which is more flexible ( http://radacad.com/append-vs-merge-in-power-bi-and-power-query ).
Best Regards,
Qiuyun Yu - Dag
Advocate II
Hi v-qiuyu-msft,
Thanks for taking an interest. I'm afraid the problem is more severe than you suggest; all columns are shuffled such that there is no connection between column heading and content.
The first column contains strings "ClientName" in both tables of the UNION. The last column contains dates "RunDay" in both tables of the UNION. The middle column contains amounts "Cost" or "spend" in the respective tables of the UNION. The two pictures of table definitions and views captures the whole story.
I use UNION frequently. Never had a problem, and out of the blue Power BI is shuffeling column names around. Therefore, I suspect NATURALINNERJOIN.
Best,
Dag
- v-qiuyu-msft
Community Support
- Dag
Advocate II
Hi v-qiuyu-msft,
I am able and willing to reproduce the error, but not OK with sharing client data publicly.
Sincerely,
Dag
- v-qiuyu-msft
Community Support
Hi Dag,
You can upload the pbix file to your Onedrive and share the link in private message, is it fine?
Best Regards,
Qiuyun Yu