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

Shape the future of the Fabric Community! Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions. Take survey.

Reply
Fern_21
Advocate III
Advocate III

Filtering a date in the slicer, I want to see all the elements on the map, not just the selected one

Hi all!

In Power BI, I have a slicer with a date field. When a specific date is selected, if the date is between the selected date and 3 hours prior, the support should be displayed as 'on' with green color coding, otherwise 'off' with gray color coding.

What measure/column can I use to filter a single date in the slicer and see all the map elements with the corresponding color coding? When I use SELECTEDVALUE, it only shows the selected element in the slicer. I also tried using ALLSELECTED to exclude the date filter, but it doesn't seem to work. Can anyone help?

Thanks

1 ACCEPTED SOLUTION
dharmendars007
Memorable Member
Memorable Member

Hello @Fern_21 , 

 

You can use a measure that calculates this logic dynamically based on the selected date.

 

SupportStatus =
VAR SelectedDate = SELECTEDVALUE('YourDateTable'[Date])
VAR ThreeHoursPrior = SELECTEDVALUE('YourDateTable'[Date]) - TIME(3,0,0)
VAR CurrentDate = MAX('YourDateTable'[Date]) // This gives you each row’s date in the visual

RETURN
IF(
NOT(ISBLANK(SelectedDate)) && CurrentDate >= ThreeHoursPrior && CurrentDate <= SelectedDate,"On","Off")

 

Once you have this measure, you can apply conditional formatting to your map elements:

Set "On" to green

Set "Off" to gray.

 

If you find this helpful , please mark it as solution which will be helpful for others and Your Kudos/Likes 👍 are much appreciated!

 

Thank You

Dharmendar S

LinkedIN 

View solution in original post

1 REPLY 1
dharmendars007
Memorable Member
Memorable Member

Hello @Fern_21 , 

 

You can use a measure that calculates this logic dynamically based on the selected date.

 

SupportStatus =
VAR SelectedDate = SELECTEDVALUE('YourDateTable'[Date])
VAR ThreeHoursPrior = SELECTEDVALUE('YourDateTable'[Date]) - TIME(3,0,0)
VAR CurrentDate = MAX('YourDateTable'[Date]) // This gives you each row’s date in the visual

RETURN
IF(
NOT(ISBLANK(SelectedDate)) && CurrentDate >= ThreeHoursPrior && CurrentDate <= SelectedDate,"On","Off")

 

Once you have this measure, you can apply conditional formatting to your map elements:

Set "On" to green

Set "Off" to gray.

 

If you find this helpful , please mark it as solution which will be helpful for others and Your Kudos/Likes 👍 are much appreciated!

 

Thank You

Dharmendar S

LinkedIN 

Helpful resources

Announcements
November Carousel

Fabric Community Update - November 2024

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

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.