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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply

Join direct query tables on a newly created/calculated column

I have two tables that I get in via DirectQuery. 

Table 1 contains complete postal codes but the formatting is all off

Table 2 is a clean table that contains postal codes too.

 

Since Table1.Postalcode is not really usable untill I format it. I needed to know if there is a way I can create a new column in table 1 & then join both.

I cannot use PowerQuery to create a new column because both tables are DirectQuery tables.

Any suggestions please?

1 ACCEPTED SOLUTION
v-deddai1-msft
Community Support
Community Support

Hi @sam245gonsalves ,

 

You can add calculated column for your table1. But there are some limitations:  

 

Calculated columns are limited to being intra-row, as in, they can only refer to values of other columns of the same table, without the use of any aggregate functions. Additionally, the DAX scalar functions, such as LEFT(), that are allowed, are limited to those functions that can be pushed to the underlying source. The functions vary depending upon the exact capabilities of the source. Functions that aren't supported aren't listed in autocomplete when authoring the DAX for a calculated column, and would result in an error if used.

 

And if you want  an accurate formula for calculating columns, please show us sample data for reference.

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

Best Regards,

Dedmon Dai

View solution in original post

2 REPLIES 2
v-deddai1-msft
Community Support
Community Support

Hi @sam245gonsalves ,

 

You can add calculated column for your table1. But there are some limitations:  

 

Calculated columns are limited to being intra-row, as in, they can only refer to values of other columns of the same table, without the use of any aggregate functions. Additionally, the DAX scalar functions, such as LEFT(), that are allowed, are limited to those functions that can be pushed to the underlying source. The functions vary depending upon the exact capabilities of the source. Functions that aren't supported aren't listed in autocomplete when authoring the DAX for a calculated column, and would result in an error if used.

 

And if you want  an accurate formula for calculating columns, please show us sample data for reference.

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

Best Regards,

Dedmon Dai

amitchandak
Super User
Super User

@sam245gonsalves , You can use power query and Dax new column for simple transformation.

Few on them discussed in series - https://www.youtube.com/watch?v=My0bLn9voo4&list=PLPaNVDMhUXGbKatyDdOhGbTL3xW2Xy6pA

 

Can you share some sample data to check. But would be better if you can do some clean up at DB level

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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