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

Next up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now

Reply
wvuthha
Frequent Visitor

One Filter for two attributes

Hi Community,

 

I have a table with from- and to-dates in two different columns. I want to filter that with one filter. Best would be a slider where I have the left circle for "from" and the right for "to". Is this possible somehow?

 

Example

ArticlePricefromto
Car3000001.01.202231.03.2022
Car3500001.04.202231.12.2022

 

With the slider I want to get the price which was relevant between 10.02.2022 and 25.02.2022.

wvuthha_0-1669643103268.png

 

Is this possible?

 

Best regards

Thomas

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @wvuthha

You need a calendar table and a measure:

vcgaomsft_1-1669686767338.png

 

Measure = 
VAR _slicer_min = MIN('Calendar'[Date])
VAR _slicer_max = MAX('Calendar'[Date])
VAR _from_date = MAX('Table'[from])
VAR _to_date = MAX('Table'[to])
VAR _filter = IF(_slicer_min<=_from_date&&_slicer_max>=_to_date,1)
RETURN
_filter

 

Add this measure to the visual level filter and set it as follows.

vcgaomsft_0-1669686740872.png

 

Best Regards,
Gao

Community Support Team

 

If there is any post helps, then please consider Accept it as the solution  to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!

How to get your questions answered quickly -- How to provide sample data

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

Hi @wvuthha

You need a calendar table and a measure:

vcgaomsft_1-1669686767338.png

 

Measure = 
VAR _slicer_min = MIN('Calendar'[Date])
VAR _slicer_max = MAX('Calendar'[Date])
VAR _from_date = MAX('Table'[from])
VAR _to_date = MAX('Table'[to])
VAR _filter = IF(_slicer_min<=_from_date&&_slicer_max>=_to_date,1)
RETURN
_filter

 

Add this measure to the visual level filter and set it as follows.

vcgaomsft_0-1669686740872.png

 

Best Regards,
Gao

Community Support Team

 

If there is any post helps, then please consider Accept it as the solution  to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!

How to get your questions answered quickly -- How to provide sample data

@Anonymous 

That's works perfectly. Many thanks to you!

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.

March Power BI Update Carousel

Power BI Community Update - March 2026

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