cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Akbarov
Helper I
Helper I

How to highlight SelectedValue in Line chart?

Hello community,

 

I have a line chart with [Date] and average of [Sales]. 

I want to highlight Selected value in line chart. But right now when I select any value , line chart disapears ( filters only selection ) and only shows selected value.

 

Can anyone help me? 

3 REPLIES 3
Akbarov
Helper I
Helper I

Can't someone give me a little details how to do that?..

 

Hi @Akbarov ,

 

Power BI cannot highlight a value through the slicer in line chart.You can try changing colors dynamically using conditional formatting in a column chart.

1. create a disconnected table as slicer:

Table = CALENDAR(MIN(Sheet2[Date]),MAX(Sheet2[Date]))

2. create a measure and apply to conditional formatting.

Measure = IF(MAX(Sheet2[Date])>=MIN('Table'[Date])&&MAX(Sheet2[Date])<=MAX('Table'[Date]),"red","black")

Vlianlmsft_0-1646291623540.pngVlianlmsft_1-1646291635177.pngVlianlmsft_2-1646291645343.png

 


Best Regards,
Liang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

amitchandak
Super User
Super User

@Akbarov , for that you need to have a slicer of the independent table and then create a measure

 

if(max(Dimension[COlumn]) = selectedvalue(IndTable[Column]), "Red", blank())

 

Create a bar visual and use that in conditional formatting using the field value option.  Convert that to line

 

refer; https://youtu.be/BIwX2I7gF5Q?t=3906



Power BI Features || Datamarts: https://youtu.be/8tskWsJTEpg || Field Parameters : https://youtu.be/lqF3Wa1FllE?t=70
Time Intelligence Decoded : https://youtu.be/aU2aKbnHuWs&t=145s
Did I answer your question? Mark my post as a solution! Appreciate your Kudos !! Proud to be a Super User! !!
Dashboard of My Blogs !! Connect on Linkedin !! Subscribe to my youtube Channel !!
Want To Learn Power BI | Beginners !! Advance Concepts !! Power BI For Tableau User !!

Helpful resources

Announcements
August 2022 update 768x460.jpg

Check it Out!

Click here to learn more about the August 2022 updates!

August 1 episode 9_no_dates 768x460.jpg

The Power BI Community Show

Watch the playback when Priya Sathy and Charles Webb discuss Datamarts! Kelly also shares Power BI Community updates.

Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

Top Solution Authors
Top Kudoed Authors