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

Prepping for a Fabric certification exam? Join us for a live prep session with exam experts to learn how to pass the exam. Register now.

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
Super User
Super User

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
Super User
Super User

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
May PBI 25 Carousel

Power BI Monthly Update - May 2025

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

Notebook Gallery Carousel1

NEW! Community Notebooks Gallery

Explore and share Fabric Notebooks to boost Power BI insights in the new community notebooks gallery.

May 2025 Monthly Update

Fabric Community Update - May 2025

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