Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.
Hello,
Hope you are doing well,
My PBI report has two slicers for date: "start date" and "end date".
The start date slicer is being ignored in my visuals.
This is posing an issue: I want to do a measure based on that slicer - "start date" - and I add it to those visuals; however, because the slicer is being ignored I can not catch the start date in this measure. I am catching the first date of Calendar'[Date] instead of the date selected in the slicer.
What can be done?
DETAILS:
Measure Start Date: 1StartDate =
VAR StartDate = MIN('Calendar'[Date])
Return StartDate
Table Calendar: Calendar =
var minyear = YEAR ( min( all_countries_DWH[sk_date_date_format] ) )
var maxyear = IF(YEAR( MAX( all_countries_DWH[sk_date_date_format] ) ) > YEAR(TODAY()), YEAR(TODAY()), YEAR( MAX( all_countries_DWH[sk_date_date_format] ) ))
var minmonth = MONTH( MIN( all_countries_DWH[sk_date_date_format] ) )
var maxmonth = IF(MONTH( MAX( all_countries_DWH[sk_date_date_format] ) ) > MONTH(TODAY()), MONTH(TODAY()), MONTH( MAX( all_countries_DWH[sk_date_date_format] ) ))
RETURN
ADDCOLUMNS(
FILTER(
CALENDARAUTO(),
[Date] >= min( all_countries_DWH[sk_date_date_format] ) &&
[Date] <= max( all_countries_DWH[sk_date_date_format] )
--YEAR([Date]) >= minyear &&
--YEAR([Date]) <= maxyear //&&
--MONTH([Date]) >= minmonth &&
--month([Date]) <= maxmonth
),
"Year",YEAR([Date]),
"Month", FORMAT([Date],"mmm"),
"Month Number", MONTH([Date]),
"Quarter",FORMAT([Date],"\QQ"),
"Year/Month",FORMAT([Date],"yyyymm"),
"Week Number", WEEKNUM([Date]),
"Week",
VAR week_start = [Date] - WEEKDAY([Date], 1) + 1 // Calculate the start of the week (Sunday)
VAR week_end = week_start + 6 // Calculate the end of the week
RETURN
WEEKNUM([Date]) & ", " &
FORMAT(week_start, "d MMM") & " - " & FORMAT(week_end, "d MMM") & " " & YEAR([Date])
)
Regards
Manuel
Solved! Go to Solution.
Hi @Anonymous
Based on the information you've provided, it looks like your measure ”StartDate“ is using ”MIN('Calendar'[Date])“ which will return the minimum date from the entire 'Calendar' table, not taking into account the slicer selection.
Here are the modifications I've made to your dax:
Modify the "StartDate" measure to use the "SELECTEDVALUE" function, which returns the value currently selected in the slicer, or a default value if nothing is selected.
StartDate =
SELECTEDVALUE(
'Calendar'[Date],
MIN('Calendar'[Date])
)
This measure will return the selected start date if there is one, or the minimum date from the 'Calendar' table if no date is selected. Like this:
If you're still having problems, provide some dummy data and the desired outcome. It is best presented in the form of a table.
Regards,
Nono Chen
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Anonymous
Based on the information you've provided, it looks like your measure ”StartDate“ is using ”MIN('Calendar'[Date])“ which will return the minimum date from the entire 'Calendar' table, not taking into account the slicer selection.
Here are the modifications I've made to your dax:
Modify the "StartDate" measure to use the "SELECTEDVALUE" function, which returns the value currently selected in the slicer, or a default value if nothing is selected.
StartDate =
SELECTEDVALUE(
'Calendar'[Date],
MIN('Calendar'[Date])
)
This measure will return the selected start date if there is one, or the minimum date from the 'Calendar' table if no date is selected. Like this:
If you're still having problems, provide some dummy data and the desired outcome. It is best presented in the form of a table.
Regards,
Nono Chen
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.