Forum Discussion
Adding column with database name in Power BI
- 4 years ago
Hi Analitika ,
Seems like you have misunderstood something in Power Query.
When you connect to the source, for example, Sybase.Database("125.25.25.98", "db_name"), it would return a table, the parameter in the function is written by you or use the parameter list. Power Query would not have the function which could extracrt the function value from another function as far as I know.
If you want to create the custom column with database name dynamically, you can try to create a databasename parameter list and use them in the database function, when you create a custom column, the value just need to equal to the parameter's name.
Source = sql.database(server name, databasename parameter)Best Regards,
Community Support Team _ Yingjie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
How make it via transform data? And I need make it dynamically. I mean table first step is source. So I need to extract db name from source then I need to use it for creating additional column.
Hi Analitika ,
Seems like you have misunderstood something in Power Query.
When you connect to the source, for example, Sybase.Database("125.25.25.98", "db_name"), it would return a table, the parameter in the function is written by you or use the parameter list. Power Query would not have the function which could extracrt the function value from another function as far as I know.
If you want to create the custom column with database name dynamically, you can try to create a databasename parameter list and use them in the database function, when you create a custom column, the value just need to equal to the parameter's name.
Source = sql.database(server name, databasename parameter)
Best Regards,
Community Support Team _ Yingjie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.