The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
Hi all,
I am creating a date picker with a dax
Solved! Go to Solution.
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.
What if there is a future date then is there any way to show today's date as default?
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