Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
mlane
Frequent Visitor

How can I have an industry standard date parameter in Power BI?

I am try to create a date parameter like can in Qlik Sense, Rshiny, Tableau with the following properties:

  • Its a true date parameter that treats date as a series instead of a list.  It can have a default date.  It can have a min and max range.
  • It able have a ""dynamic"" default value set by a calculation from a field.  In my most recent case, I would want that field to the refresh date that the data and semantic model was last refreshed
  • Is fixed at load or refresh

 

P.S.  This is kind of a industry standard concept in Business Intellegence at this point.

1 REPLY 1
FreemanZ
Super User
Super User

hi @mlane 

 

  • you can mark a table as date table:

https://learn.microsoft.com/en-us/power-bi/transform-model/desktop-date-tables

 

  • in your date table definition, you can reference today() or MIN/MAX of a date column in your fact table, like:

Date =

ADDCOLUMNS (

CALENDAR (MIN(Fact[Date]), TODAY()),

"Year", YEAR ( [Date] ),

"Qtr", "Q" & FORMAT ( [Date], "Q" ),

"MonthNO", FORMAT ( [Date], "MM" ),

"Month", FORMAT ( [Date], "MMM" ),

"Day",FORMAT ( [Date], "DD" ),

"YYQ", FORMAT ( [Date], "YY" ) & "Q" & FORMAT ( [Date], "Q" ),

"YY/MM", FORMAT ( [Date], "YY/MM" ),

"Weekday", WEEKDAY ( [Date],2 )

)

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.