Forum Discussion
Anonymous
5 years agoNot applicable
how Can we pass USERPRINCIPLE or USERNAME as a query parameter in power BI
Hi, I have oracle store proceure and I successfully loaded data using store procedure in Power BI, now I want to excute my store procedure dynamically with paramter, it shoud executed by power BI...
- 5 years ago
Hi Anonymous ,
as lbendlin mentioned, you cannot retrieve these values with Power Query.
How about considering a workaround that fetches the user from the database login instead?
I'm using this function for it:= ()=> let Source = MySQL.Database("myDBconnectionString", "myTableName", [ReturnSingleDatabase=true, Query="SELECT current_user"]), current_user = Source{0}[current_user], Custom1 = Text.BeforeDelimiter(current_user, "@") in Custom1
lbendlin
5 years agoSuper User
Thankfully this is not possible. If you need that level of control, use Row Level Security and/or Direct Query mode against the Oracle table or view.
ImkeF
5 years agoCommunity Champion
Hi Anonymous ,
as lbendlin mentioned, you cannot retrieve these values with Power Query.
How about considering a workaround that fetches the user from the database login instead?
I'm using this function for it:
= ()=>
let
Source = MySQL.Database("myDBconnectionString", "myTableName", [ReturnSingleDatabase=true, Query="SELECT current_user"]),
current_user = Source{0}[current_user],
Custom1 = Text.BeforeDelimiter(current_user, "@")
in
Custom1