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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
Hoping
Helper III
Helper III

Remove filter on a column but also find selected value

I am trying to come up with a tooltip page on a matrix that shows line chart or column chart for all years and highlights the year based on where the cursor is placed ( through conditional formatting).

 

Sample Data :

Hoping_0-1709588727776.png

 

The matrix visual looks as below with Year on the COlumn and City on the Row

 

Hoping_1-1709588886212.png

Measure - SumMeasure = SUM('Fact Table'[Fact Count])

 

I am creating a tooltip page that displays a line chart for all years 2021 - 2024 (irrespective of slicer filtering) but highlights the year column on which cursor is placed in a different color.

For Example, if I place my cursor second row last column, I should show the column / bar that shows the 2024 value for Philadephia which is 3 in a different color. But there should be 5 columns for 2020, 2021...2024 even though the year slicer is filtered from 2021 to 2024.  

 

This is how far I got:  I turned off Keep Filters on the tooltip page. Added the city as a filter card.  With Year on x-axis and SumMeasure on y-axis, I am able to get all the years.  

 

Problem: How do I highlight the bar in a different color based on the cursor position. Since I am turning off Keep Filters, year is not flowing through so I do not know where the cursor was placed.

 

How can I achieve this ?

 

1 ACCEPTED SOLUTION
Jihwan_Kim
Super User
Super User

Hi,

One of ways to achieve this is to create a disconnected year axis table, something like below.
Please check the below picture and the attached pbix file.

 

Jihwan_Kim_1-1709611485695.png

 

 

Jihwan_Kim_0-1709611467805.png

 

SumMeasure: = 
SUM(Data[Fact Count])

 

TREATAS function - DAX | Microsoft Learn

 

Tooltip SumMeasure: = 
CALCULATE (
    [SumMeasure:],
    TREATAS ( VALUES ( 'CT Year tooltip axis'[Year] ), 'Year'[Year] )
)

 

cf Column color: = 
VAR _yearselect =
    SELECTEDVALUE( 'Year'[Year] )
RETURN
    IF (
        SELECTEDVALUE ( 'CT Year tooltip axis'[Year] ) = _yearselect,
        "Red",
        "Yellow"
    )

 


If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Click here to visit my LinkedIn page

Click here to schedule a short Teams meeting to discuss your question.

View solution in original post

1 REPLY 1
Jihwan_Kim
Super User
Super User

Hi,

One of ways to achieve this is to create a disconnected year axis table, something like below.
Please check the below picture and the attached pbix file.

 

Jihwan_Kim_1-1709611485695.png

 

 

Jihwan_Kim_0-1709611467805.png

 

SumMeasure: = 
SUM(Data[Fact Count])

 

TREATAS function - DAX | Microsoft Learn

 

Tooltip SumMeasure: = 
CALCULATE (
    [SumMeasure:],
    TREATAS ( VALUES ( 'CT Year tooltip axis'[Year] ), 'Year'[Year] )
)

 

cf Column color: = 
VAR _yearselect =
    SELECTEDVALUE( 'Year'[Year] )
RETURN
    IF (
        SELECTEDVALUE ( 'CT Year tooltip axis'[Year] ) = _yearselect,
        "Red",
        "Yellow"
    )

 


If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Click here to visit my LinkedIn page

Click here to schedule a short Teams meeting to discuss your question.

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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