Forum Discussion
how Can we pass USERPRINCIPLE or USERNAME as a query parameter in Power Query
- 2 years ago
I understand your needs but I think it's not possible. I can't figure out other solutions.
The only thing I can still suggest is to duplicate the semantic model, or make a specific dataflow for each developer, then each developer will connect to his own dataflow
I've set something up like this. First, you have to have A data model set up in order to use the userprincipalname function. So I just made a table with today's date that loaded to the date model. Then I added the userprincipalname function to the data model, and loaded the result to a page in Excel. I then used that cell with the user principal name as the source of a new query, which you can then use as a filter/parameter/whatever you like. It's important that you set that query to load upon opening the file, so that the current user's user principal name is ready when you refresh the rest of the data.
--Nate