TODAY() function in Power Query
✓ Published0🌍 Public
HHugoberry
Last edited Mar 22, 2017
Created on Mar 22, 2017
This example demonstrates how to retrieve the current date from Power Query by leveraging the local Analysis Services instance that Power BI Desktop uses internally. The visualization shows the TODAY() function’s result fetched through a DAX query executed against a dynamic port number. The code uses the Folder.Contents and Folder.Files functions to locate the msmdsrv.port.txt file, which stores the active port, then passes that port to AnalysisServices.Database to run the query. The output is a table with a single row containing the current date, reflecting the system’s local date at query time.
AI-generated description