Power Query finding port number of the running embeded tabular instance
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
()=> | |
let | |
//Assume current user is the one with latest [Date accessed] folder in C:\Users | |
CurrentUser = Table.FirstN( | |
Table.Sort(Folder.Contents("C:\Users"), | |
{{"Date accessed", Order.Descending}}), | |
1)[Name]{0}, | |
//Read the contents of file msmdsrv.port.txt from subfolder of AnalysisServicesWorkspaces | |
Port = Lines.FromBinary( | |
Table.SelectRows( | |
Folder.Files("C:\Users\"& | |
CurrentUser& | |
"\AppData\Local\Microsoft\Power BI Desktop\AnalysisServicesWorkspaces"), | |
each ([Name] = "msmdsrv.port.txt"))[Content]{0},null,null,1200){0} | |
in | |
Port |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment