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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
pradeepyadav921
Frequent Visitor

DatePicker with a current default date

Hi all, 
I am creating a date picker with a dax

Calendar =
VAR Days = CALENDAR ( DATE ( 2024, 1, 1 ), DATE ( 2024, 12, 31 ) )
RETURN ADDCOLUMNS (
    Days,
    "Formatted Date", FORMAT([Date], "yyyy-mm-dd"),
    "Year", YEAR ( [Date] ),
    "Month Number", MONTH ( [Date] ),
    "Month", FORMAT ( [Date], "mmmm" ),
    "Year Month Number", YEAR ( [Date] ) * 12 + MONTH ( [Date] ) - 1,
    "Year Month", FORMAT ( [Date], "mmm yy" ),
    "Week Number", WEEKNUM ( [Date] ),
    "Week Number and Year", "W" & WEEKNUM ( [Date] ) & " " & YEAR ( [Date] ),
    "WeekYearNumber", YEAR ( [Date] ) & 100 + WEEKNUM ( [Date] ),
    "Is Working Day", NOT WEEKDAY([Date]) IN {1,7}
)
 Is there any way to to get default date as a today's date for selection like in this date picker for default value it should show today date

pradeepyadav921_0-1712652910997.png

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @pradeepyadav921 ,

Regarding your question, you can do the following.

1.Setting Relative Date Filters

Create a relative date slicer or filter in Power BI - Power BI | Microsoft Learn

vzhouwenmsft_0-1712727012991.png

vzhouwenmsft_1-1712727039393.png

2.If you want to filter for other dates, you can combine the button with a bookmark

Create bookmarks without filtering the data

vzhouwenmsft_2-1712727128652.png

Combining bookmarks with buttons

vzhouwenmsft_3-1712727211900.png

3.Final output

vzhouwenmsft_4-1712727303470.png

vzhouwenmsft_5-1712727315930.png

 

View solution in original post

3 REPLIES 3
Anonymous
Not applicable

Hi @pradeepyadav921 ,

Regarding your question,if there is no future data in the dataset, you can do the following.

1.Modify your DAX expression

 

 

Calendar = 
VAR Days = CALENDAR ( DATE ( 2024, 1, 1 ), TODAY() )
RETURN ADDCOLUMNS (
    Days,
    "Formatted Date", FORMAT([Date], "yyyy-mm-dd"),
    "Year", YEAR ( [Date] ),
    "Month Number", MONTH ( [Date] ),
    "Month", FORMAT ( [Date], "mmmm" ),
    "Year Month Number", YEAR ( [Date] ) * 12 + MONTH ( [Date] ) - 1,
    "Year Month", FORMAT ( [Date], "mmm yy" ),
    "Week Number", WEEKNUM ( [Date] ),
    "Week Number and Year", "W" & WEEKNUM ( [Date] ) & " " & YEAR ( [Date] ),
    "WeekYearNumber", YEAR ( [Date] ) & 100 + WEEKNUM ( [Date] ),
    "Is Working Day", NOT WEEKDAY([Date]) IN {1,7}
)

 

 

2.Creating a slicer

vzhouwenmsft_0-1712716071296.png

3.Final output

vzhouwenmsft_1-1712716100781.png

Best Regards,
Wenbin Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

What if there is a future date then is there any way to show today's date as default? 

Anonymous
Not applicable

Hi @pradeepyadav921 ,

Regarding your question, you can do the following.

1.Setting Relative Date Filters

Create a relative date slicer or filter in Power BI - Power BI | Microsoft Learn

vzhouwenmsft_0-1712727012991.png

vzhouwenmsft_1-1712727039393.png

2.If you want to filter for other dates, you can combine the button with a bookmark

Create bookmarks without filtering the data

vzhouwenmsft_2-1712727128652.png

Combining bookmarks with buttons

vzhouwenmsft_3-1712727211900.png

3.Final output

vzhouwenmsft_4-1712727303470.png

vzhouwenmsft_5-1712727315930.png

 

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

Find out what's new and trending in the Fabric community.

July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.

Top Solution Authors