Trailing days query parameter filter

  1. Open a Power BI Desktop file locally and access the Query Editor by clicking on Edit Queries from the Home tab.
  2. Create a blank query to retrieve the current date via the following M expression:
The Current Date is returned as a Date type
  • Name the new query CurrentDate and disable its load to the data model
  1. From the Home tab of the Query Editor, click on the Manage Parameters dropdown and select New Parameter:
New Parameter Created for Filtering Fact Table Queries
  1. Give the query a name, a data type, ...

Get Microsoft Power BI Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.