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

Preparing for a certification exam? Ask exam experts all your questions on May 15th. Register now.

Reply
Alejandro
Regular Visitor

Filtering a Calendar Slicer with other Calendar slicer

Hello,

 

I have two calendar slicers (with two calendar tables associated):

 

- One for general filtering

- Another to select a previous period to compare with.

 

I want that the general slicer to filter the comparator slicer: Doing that Min Date (minus one day) on general slicer would be max date on comparator slicer.

 

Something like this:

 

Alejandro_0-1659442225311.png

So, to do that I created a Measure (ShowDate ) that indicates that and I filtered the comparator slicer with that measure:

 

ShowDate =
var  MinSelected = MIN('Calendar'[Date])
var MaxCompare = MAX('Calendar_Comparations'[Date])
return
IF(MinSelected > MaxCompare , 1 , 0)

Alejandro_1-1659442225397.png

 

 

All is working fine until on the comparator slicer I select as last date the min date (minus one day) of the general one, the filter is not working well:

 

Max date posible is selected on the comparator slicer:

Alejandro_3-1659442225693.png

 

Otherwise is working well:

Alejandro_2-1659442225604.png

 


Why is this happening, it is a bit wierd, what I am doing wrong?
 
Thanks
1 REPLY 1
amitchandak
Super User
Super User

@Alejandro , this approach os using a  measure based on other filter do not work well with range slicer

 

a measure like this can help, but work for a list or drop-down

 

filter date2 slicer using date 1

new measure =
var _max = maxx(allselected(Date1),Date1[Date])
var _min = minx(allselected(Date1),Date1[Date])
return
calculate( count(Date2[Date]), filter('Date2', 'Date2'[Date] >=_min && 'Date2'[Date] <=_max))

 

check for non blank

Full Power BI Video 20 Hours YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
PBIApril_Carousel

Power BI Monthly Update - April 2025

Check out the April 2025 Power BI update to learn about new features.

Notebook Gallery Carousel1

NEW! Community Notebooks Gallery

Explore and share Fabric Notebooks to boost Power BI insights in the new community notebooks gallery.

April2025 Carousel

Fabric Community Update - April 2025

Find out what's new and trending in the Fabric community.