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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
anand_kumar
New Member

Can I change the dropdown slicer selection by another date slicer?

I have two slicer 1. dropdown that contains minute/hour/day value as below table

 

IDDesc
1minute
2hour
3day

 

2 slicer has date range from 6/10/2020 to 10/30/2020

My requirement, Can I change the selection of dropdown when I change date range as below scenario

If the date range is 7 days the dropdown selection should be change dynamically to an hour, if the date range is 1 day the dropdown selection should be change dynamically to minutes, and so on. Can I do this?

1 ACCEPTED SOLUTION
v-zhenbw-msft
Community Support
Community Support

Hello @anand_kumar ,

We can create two measures to meet your needs.

Measure = 
var _mindate = MIN('date table'[Date])
var _maxdate = MAX('date table'[Date])
var _difference = _maxdate - _mindate
return
IF(
    _difference=1,1,
    IF(
        _difference=7,2,3))

Measure 2 = 
IF(
    SUM('Table'[ID])=[Measure],1,0)

Next, we click the slicer, place Measure2 under Filter in this visual, and set the value to 1.

can1.jpg

can2.jpg

can3.jpg

can4.jpg

If you don't meet your requirements, could you show the exact expected result based on the table you shared?

Best regards

Community support team _ zhenbw

If this post helps,then consider Accepting it as the solution to help other members find it faster.

BTW, pbix as an attachment.

View solution in original post

1 REPLY 1
v-zhenbw-msft
Community Support
Community Support

Hello @anand_kumar ,

We can create two measures to meet your needs.

Measure = 
var _mindate = MIN('date table'[Date])
var _maxdate = MAX('date table'[Date])
var _difference = _maxdate - _mindate
return
IF(
    _difference=1,1,
    IF(
        _difference=7,2,3))

Measure 2 = 
IF(
    SUM('Table'[ID])=[Measure],1,0)

Next, we click the slicer, place Measure2 under Filter in this visual, and set the value to 1.

can1.jpg

can2.jpg

can3.jpg

can4.jpg

If you don't meet your requirements, could you show the exact expected result based on the table you shared?

Best regards

Community support team _ zhenbw

If this post helps,then consider Accepting it as the solution to help other members find it faster.

BTW, pbix as an attachment.

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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