The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
I am trying to get a column added to a table in my report from that has a new column added to the source that I want.
In power query what type of statement should I use to get the column from the source? Get Data will not work apparently for that use case.
Thanks!
@Anonymous can you share sample data and expected result, your question is not clear to me.
Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!
Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo
If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤
Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.
Ok
you have a source SQL Server table called cars with model as the columns model .
You already have a report that has the model column but not the year when you imported it.
You find out the table has changed and a new column named year was added. You now only want that one
column called year. How do you get it into your report without get data?
model year
ford 1909
chevy 1945
hyundi 2002
@Anonymous i dont think there is a way, you have to go to power query and refresh your table to get the new column.
Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!
Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo
If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤
Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.
Ok,
For simple use cases what Power BI Desktop does is ok and your answer is right. But usually for larger tables the preference is to use M or SQL instead because of the concerns about performance and size of data and cloud costs.
I think I just need to find examples using M to read from the source specific columns. I started out simple using the easyest way to create reports and along the way things got more complicated.
Thanks!
Hi @Anonymous ,
How about the result after you follow the suggestions mentioned in my original post?Could you please provide more details about it If it doesn't meet your requirement?
Best regards,
Hi @Anonymous ,
First of all, make sure you have a backup file before change anything in power query editor.
We think we can try to change the query of previous table to add a new column, For example, We only import id column at first (by select column in power query)
let
Source = Sql.Database("SQLIP", "DATABASE"),
TABLENAME = Source{[Schema="dbo",Item="TABLE"]}[Data],
#"Removed Other Columns" = Table.SelectColumns(TABLENAME,{"id"})
in
#"Removed Other Columns"
If we want to add the DateTime column into this table, we need to modify the Table.SelectColumns finction as following:
let
Source = Sql.Database("SQLIP", "DATABASE"),
TABLENAME = Source{[Schema="dbo",Item="TABLE"]}[Data],
#"Removed Other Columns" = Table.SelectColumns(TABLENAME,{"id","DateTime"})
in
#"Removed Other Columns"
Best regards,