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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
MaxItaly
Helper III
Helper III

Query Merging Two Tables by a Calculated Column

Hello everyone!
My question is simple: what I'd like to do is merging two tables (that I've imported from a SQL Server) by a calculated column that I've created in each table.

 

When I go on the query editor, and I click on the Query Merge, I can select the tables I want to merge, the kind of Join I want and the Columns I want to use to perform the join, but I cannot see the Calculated Columns that I created.

I wonder if I can overcome this problem in Power BI Desktop, I'd prefer avoiding to create a custom table on the SQL Server.
Do I have (if possible) to manually modify the query?
Many thanks to anyone who can help me!

1 ACCEPTED SOLUTION
Anonymous
Not applicable

To do this, you must calculate the column in your Query Editor, and not in DAX. Personally, for reasons like this, I've been using DAX almost exclusively to only create Measures.

 

If you post what your DAX does, I might be able to show you how to do that in M or with the Query Editor's GUI instead. If you do this, you'll be able to use the Query Editor's merge functionality on that column.

View solution in original post

5 REPLIES 5
Anonymous
Not applicable

To do this, you must calculate the column in your Query Editor, and not in DAX. Personally, for reasons like this, I've been using DAX almost exclusively to only create Measures.

 

If you post what your DAX does, I might be able to show you how to do that in M or with the Query Editor's GUI instead. If you do this, you'll be able to use the Query Editor's merge functionality on that column.

Hi,

 

I recently came into this problem myself and I tried creating the column in the Query Editor instead as you suggested. My data has several million rows howevre and when I try to created the column in Query Editor, it seems to be taking a very very long time - so long that I just cancelled out of it. 

Am I doing this incorrectly or that is just how it works due to it being in query editor and the large amount of data?

 

Thanks

Hi

I saw your anwer and I have the same issue. I was wondering if you could help me. This is what I crated in DAX

Forecasted_CM = SWITCH(TRUE(),'Accounts'[ax_cmchangeplanned] = TRUE(), 'Accounts'[ax_newcmname], 'Accounts'[ax_cmchangeplanned] = FALSE(), 'Accounts'[CM] )
 
but to be honest I'm not even sure what is the Query Editor. Could you please help? How do I calculate that column using Query Editor rather than DAX?
 
Your help is very much appreciated!
Erika 😊
 

I have the same problem. I want to create a Calc Column in the Query Editor using a RELATED to another table. How can I solve that problem?

Ah, now I understand, thanks!
It seems not to be too much difficult, I'm gonna try on my own! Thanks!

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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