Forum Discussion
Analitika
4 years agoPost Prodigy
How automatically get database name in Power BI?
Hi,
I would like to get database name and add it to table as separate column. Let's say having table and adding new column within that used database.
1 Reply
- Hariharan_RSolution Sage
Hi,
If you use parameter to store the Servername and DBname then you can refer the parameter in the new column to get the database name.
If you use SQL server then you can use below script in new query and get the database name.
let
Source = Sql.Database("ServerName", "AdventureWorks2019", [Query="SELECT DB_NAME()"])
in
SourceThanks
Hari