Last active
September 5, 2020 11:38
-
-
Save Hugoberry/5c9948a2729be7ab0a4af83356c27ce5 to your computer and use it in GitHub Desktop.
Power Query get current USERNAME via NTFS route
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Assumes current user is the one with latest [Date accessed] folder in C:\Users | |
let | |
Users = Folder.Contents("C:/Users"), | |
CurrentUser = Table.FirstN(Table.Sort(Users,{{"Date accessed", Order.Descending}}),1)[Name]{0} | |
in | |
CurrentUser |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment