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
selected_
Helper IV
Helper IV

How to put columns in same query via get data SQL statement?

I'm trying to do custom column calcuation via the get data when choosing snowflake. 

from the window box i fill server name, WH and databse details and then in the SQL statment window I write my custom SQL syntax which look like this:

 

select sum(column) from adventureDW

 

then it creates a new table with that calculated column but the things is next time when I wanna do same thing it creates a new table. How can I move these calculated columns I have create via this step above into same table?

3 REPLIES 3
shugh
Frequent Visitor

Hi there, 

 

By just doing the query:

select sum(column) from adventureDW

 

You are just querying the database but if you wanted to combine data with other sources you would need some kind of join column so your query would look something like this:

 

select joincolumn, sum(column) from adventureDW

 

Then in PowerQuery you can then join this table to another table to bring the data together by using the merge feature and selecting the matching column between the two tables to merge on.

 

Apologies if this isn't on the right lines, you may need to provide screenshots for further info.

Hi,

No it's not join. 

 

You can move for example measures into another tab but is that possible to do it for columns?

Hi @selected_,

How about creating a static table in your database with the calculated fields to get the total result from the particular table? I think it should fix the temp result table issues.
In addition, you can also consider invoking the stored procedure which returns the summarized values.

Regards,
Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

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.