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

The FabCon + SQLCon recap series starts April 14th at 8am Pacific. If you’re tracking where AI is going inside Fabric, this first session is a can't miss. Register now

Reply
Anonymous
Not applicable

Date Range Parameters

I have after date slicer and before date slicer on 'Date'[St_Date] and 'Date'[end_date] i want to show selected date

 

I have written an measure as below

 

Range= "From" & selectedvalue('Date'[St_Date]) & "to" selectedvalue('Date'[St_Date])

 

Output: From to

 

I want output: from 01/01/1900 to 31/12/9999

1 ACCEPTED SOLUTION
v-lili6-msft
Community Support
Community Support

hi, @Anonymous 

For selectedvalue returns the value when the context for columnName has been filtered down to one distinct value only. Otherwise returns alternateResult.

You need to adjust your formula as below:

Range = "From" & MIN('Date'[St_Date]) & "to" &MAX('Date'[end_date])

Best Regards,

Lin

 

Community Support Team _ Lin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

5 REPLIES 5
v-lili6-msft
Community Support
Community Support

hi, @Anonymous 

For selectedvalue returns the value when the context for columnName has been filtered down to one distinct value only. Otherwise returns alternateResult.

You need to adjust your formula as below:

Range = "From" & MIN('Date'[St_Date]) & "to" &MAX('Date'[end_date])

Best Regards,

Lin

 

Community Support Team _ Lin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not applicable

Hi,

 

This formula works but when user selects date before 2016(for eg. 01/01/2010 ) it is still showing 2016 cause my date table have relationship with other table"s effective date and it's minimum date is 2016.

I can't make my relationship inactive between these two tables.

So is there any way so that i can display whatever user selects the date in before/after date slicer.

hi, @Anonymous 

If so, please adjust the formula as below:

Range = "From" & MIN( "field in Start Date slicer" ) & "to" &MAX( "field in End Date slicer" )

If not your case, please share your simple sample data with your expected output.

 

Best Regards,

Lin

 

Community Support Team _ Lin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not applicable

ur previous measure is correct.

i have after/before date slicer.

user can select any date. but the date column is mapped with effective date of other table in relationship.

and effective values are 01-01-2016 onwards only.

 

if user selects 01-01-2010 in date slicer so still it is giving result 01-01-2016 as we are using min ('date'[st_Date])

 

I need output like whatever user selects that should  display.

hi, @Anonymous 

Yes, just replace min (the field in date slicer ) with min ('date'[st_Date]).

 

Best Regards,

Lin

Community Support Team _ Lin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.