- Open the Power BI Desktop model file locally (Import or DirectQuery modes).
- From Report View, click on the Edit Queries icon on the Home tab to open the Query Editor.
- Select an existing query in the Queries pane on the left, right-click the query, and select Duplicate.
- With the duplicated query selected, enter a name, such as Date Intelligence, in the Query Settings pane on the right.
- Click on the Advanced Editor icon on the Home tab and revise the M expression as follows:
let Source = AdWorksProd, DateIntelligence = Value.NativeQuery(Source,"Select 1 as Dummy")in DateIntelligence
- The Value.NativeQuery() function passes a T-SQL statement against the database specified by the AdWorksProd query
The AdWorksProd ...