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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
amaaiia
Super User
Super User

Issue trying to block the 'between' slicer through a measure

The goal of what I want to achieve is that when I select the 'last30days' option in the slicer, the calendar gets locked, and when I select 'custom', it gets activated. I am trying to achieve this with the following measure, which is set to 1 if I select the 'custom' option and to 0 if I select the 'last30days' option.

amaaiia_0-1737618944802.png

 I have this measure in the calendar filters as shown in the following image. The problem is that regardless of the option I select, the calendar gets deactivated. 

amaaiia_1-1737618955560.png

amaaiia_2-1737618959428.png

This happens with the 'between' type slicer; with the rest, it performs the action correctly, but I need it to work with the 'between'.

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @amaaiia ,

 

By default, the interaction state between slicers is off. Please turn it on manually:

vcgaomsft_1-1737688886223.png

 

vcgaomsft_2-1737688926551.png

vcgaomsft_3-1737688940685.png

30days = 
VAR __min_date = MIN( 'Date'[Date] )
VAR __max_date = MAX( 'Date'[Date] )
VAR __today = TODAY ()
VAR __30_days_before = __today - 29
VAR __filter_tag =
    IF (
        ISBLANK ( SELECTEDVALUE ( CU_003_TRAZA_LAST30DAYS[tipo] ) )
            || SELECTEDVALUE ( CU_003_TRAZA_LAST30DAYS[tipo] ) = "custom",
        1,
        IF ( __min_date >= __30_days_before && __max_date <= __today, 1, 0 )
    )
RETURN
    __filter_tag

 

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 in the Power BI Forum

View solution in original post

1 REPLY 1
Anonymous
Not applicable

Hi @amaaiia ,

 

By default, the interaction state between slicers is off. Please turn it on manually:

vcgaomsft_1-1737688886223.png

 

vcgaomsft_2-1737688926551.png

vcgaomsft_3-1737688940685.png

30days = 
VAR __min_date = MIN( 'Date'[Date] )
VAR __max_date = MAX( 'Date'[Date] )
VAR __today = TODAY ()
VAR __30_days_before = __today - 29
VAR __filter_tag =
    IF (
        ISBLANK ( SELECTEDVALUE ( CU_003_TRAZA_LAST30DAYS[tipo] ) )
            || SELECTEDVALUE ( CU_003_TRAZA_LAST30DAYS[tipo] ) = "custom",
        1,
        IF ( __min_date >= __30_days_before && __max_date <= __today, 1, 0 )
    )
RETURN
    __filter_tag

 

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 in the Power BI Forum

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors