Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
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 :
The matrix visual looks as below with Year on the COlumn and City on the Row
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 ?
Solved! Go to Solution.
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.
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"
)
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.
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"
)
Check out the July 2025 Power BI update to learn about new features.
User | Count |
---|---|
23 | |
7 | |
7 | |
6 | |
6 |
User | Count |
---|---|
27 | |
12 | |
10 | |
9 | |
6 |