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

We've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now

Reply
bcng
Frequent Visitor

Using selected date in slicer to filter dates in another table

I have two separate tables:

1. "From" date

2. "To" date

 

Both tables have identical list of dates but I would like to use both as them as separate slicers.

 

For Example, I have dates from 1/1/2019 till 20/1/2019.

 

If I selected 10/1/2019 in the "From" date slicer, I would like the "To" date slicer to only show the dates after 10/1/2019, which is the selected value in the "from" date slicer.

 

I have been searching the net for answers for a few days now and I hope someone can help me with this!

 

1 ACCEPTED SOLUTION

Hi @bcng,

Based on my test, you could refer to below steps:

Create a measure:

Measure = IF(CALCULATE(MAX('To'[Date]))>=SELECTEDVALUE('From'[Date]),1,0)

Set the visual slicer:

1.PNG

Result:

1.PNG

But the measure could not be applied it in the slicer, I suggest you use the measure in visual.

 

Regards,

Daniel He

Community Support Team _ Daniel He
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

3 REPLIES 3
Greg_Deckler
Community Champion
Community Champion

So, typically the way you do that is to disconnect your slicers from everything using Edit Interactions. Then you create a measure that grabs the MAX or SELECTEDVALUE of each slicer and performs a calculation which returns a value if it is within that range or BLANK() or 0 otherwise and that essentially becomes your filter.

 

If that doesn't help, need more information to be more specific. Please see this post regarding How to Get Your Question Answered Quickly: https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

Hi Greg,

 

I tried using this measure:

Measure = IF('To Date'[Current Historical]>=VALUES('From Date'[Current Historical]),'To Date'[Current Historical],BLANK())
 
but I am getting this error:
A single value for column 'Current Historical' in table 'To Date' cannot be determined. This can happen when a measure formula refers to a column that contains many values without specifying an aggregation such as min, max, count, or sum to get a single result.
 
Can't seem to figure out how to work around this error.
 
I have already created a relationship between the two columns
 
 

Hi @bcng,

Based on my test, you could refer to below steps:

Create a measure:

Measure = IF(CALCULATE(MAX('To'[Date]))>=SELECTEDVALUE('From'[Date]),1,0)

Set the visual slicer:

1.PNG

Result:

1.PNG

But the measure could not be applied it in the slicer, I suggest you use the measure in visual.

 

Regards,

Daniel He

Community Support Team _ Daniel He
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.