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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

Limit a date slicer with another date slicer based on maximum selected date

Hi Team,

 

I am looking for a solution here. Basically I want to filter(A) one date slicer based on maximum date selected in another date slicer(B).

Let's say If I am selecting any particular date in slicer B then other slicer A should show only previous 7 days of selected date from slicer B.

Anothe example is like I am selecting 20th April in slicer B then slicer A should show only 7 days date range like (12th april to 19th April only)

7 REPLIES 7
v-cgao-msft
Community Support
Community Support

Hi @Anonymous ,

 

It is not yet possible to use slicers to dynamically control other slicers. Calculated columns and tables are not recalculated when the slicer changes. In other words, the slicer does not interact with the calculated table and calculated columns, and no filtering is possible.

 

Someone has proposed a similar idea and you can vote for this idea.

Microsoft Idea (powerbi.com)

 

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 with it, please feel free to let us know. Thanks a lot!

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

Anonymous
Not applicable

Hi JirkaZ, Thanks for replying.

I need the slicer A to show minus 7 days  only from maximum selected date from slicer B. 

I am not sure what should be the desired dates here because it totaly depends on the selection of date from slicer B. I just need to see (-7 days) of that selected date.

 

 

JirkaZ
Solution Specialist
Solution Specialist

The desired dates will result from a calculation within the measure... example would be to use 
DATEADD(DimDate[Date], [MaxDateFromSlicerB], -7, DAY)

Anonymous
Not applicable

It looks like I would need two date table instead of one for each slicer. Correct me if I am wrong.

JirkaZ
Solution Specialist
Solution Specialist

Yup - the one for slicer B wil be disconnectet from the rest of the data model

Anonymous
Not applicable

Hi JirkaZ,

 

I am using below dax however it is throwing some error.

slicer = DATEADD(Calendar2[Date], [max date], -7, day)
 
Here max date is from calendar 2
JirkaZ
Solution Specialist
Solution Specialist

Create a measure that will hold the desired dates and that will return 1 or 0 based on the date check. Filter Slicer A by that measure where the value = 1.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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

Top Solution Authors