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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

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
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

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.