Forum Discussion
DatePicker with a current default date
- Anonymous2 years ago
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
2.If you want to filter for other dates, you can combine the button with a bookmark
Create bookmarks without filtering the data
Combining bookmarks with buttons
3.Final output
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
3.Final output
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.
- pradeepyadav9212 years agoFrequent Visitor
What if there is a future date then is there any way to show today's date as default?
- Anonymous2 years agoNot 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
2.If you want to filter for other dates, you can combine the button with a bookmark
Create bookmarks without filtering the data
Combining bookmarks with buttons
3.Final output