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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
Antmkjr
Post Patron
Post Patron

Calculated columns to a direct query source

What are the alternatives of adding calulated column to a direct query source,

I understand it can be done using power query, but the logic is slightly complicated to do in power query.

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi  @Antmkjr ,

This is not possible.

With calculated columns, you can add new data to a table already in your model. But instead of querying and loading values into your new column from a data source, you create a Data Analysis Expressions (DAX) formula that defines the column's values, after the model content is imported into the memory, the result of the DAX expression is calculated, and the Power Query calculated column is an M expression, which defines the transformation applied to the data source before the table is imported into the data model.

 

You can take a look at the following articles, apart from the differences in the languages used to create them, there are other differences between them:

https://docs.microsoft.com/en-us/power-bi/transform-model/desktop-calculated-columns

http://radacad.com/m-or-dax-that-is-the-question

https://www.sqlbi.com/articles/comparing-dax-calculated-columns-with-power-query-computed-columns/

 

 

Best Regards,

Liu Yang

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

View solution in original post

3 REPLIES 3
Anonymous
Not applicable

Hi  @Antmkjr ,

This is not possible.

With calculated columns, you can add new data to a table already in your model. But instead of querying and loading values into your new column from a data source, you create a Data Analysis Expressions (DAX) formula that defines the column's values, after the model content is imported into the memory, the result of the DAX expression is calculated, and the Power Query calculated column is an M expression, which defines the transformation applied to the data source before the table is imported into the data model.

 

You can take a look at the following articles, apart from the differences in the languages used to create them, there are other differences between them:

https://docs.microsoft.com/en-us/power-bi/transform-model/desktop-calculated-columns

http://radacad.com/m-or-dax-that-is-the-question

https://www.sqlbi.com/articles/comparing-dax-calculated-columns-with-power-query-computed-columns/

 

 

Best Regards,

Liu Yang

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

amitchandak
Super User
Super User

@Antmkjr , You have a simple calculation is power query and DAX both. What you need will decide that.

 

Another way is line level calculation in measure using sumx, minx, maxx etc

 

few possible stuff is covered under this series

https://www.youtube.com/watch?v=My0bLn9voo4&list=PLPaNVDMhUXGbKatyDdOhGbTL3xW2Xy6pA

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

I am sorry I didnt get this -", You have a simple calculation is power query and DAX both. What you need will decide that"

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

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