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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
sohananahid
Post Partisan
Post Partisan

Highlight specific rows in a table visual that meets a condition

Hi all: Good day! I have a ‘Summary table’ visual that shows maintenance notice data for different pipelines. It shows pipeline name, event subject, start date, end date, update date, etc. as below

sohananahid_0-1599081859540.png

 

I want to highlight those rows that have an update date from yesterday [1 day earlier than today] and beyond. I have created a query,  prevDayFilter

sohananahid_0-1599082053391.png

 

I am trying to use updateDate>=prevDayFilter to apply to specific rows that will meet this condition and get it highlighted with a color, say yellow.I have created another query, RowHighlight as

= IF (SELECTEDVALUE(genscape_maintenance_events[updateDate])>=prevDayFilter; 1;0))

As I start applying conditional formatting for each Column in the ‘Table’ visual to have specific rows get highlighted: I get an issue as below: the Based on field shows ‘Count of RowHighlight’ instead of only ‘RowHighlight’ – so it highlights all cells of that column, e.g. PipelineName in yellow rather than only those cells that meet the condition!

 

sohananahid_1-1599081859545.png

Any suggestion? Many thanks in advance. 🙂

I followed a post: https://community.powerbi.com/t5/Desktop/highlight-specific-rows-in-matrix/m-p/893600

2 ACCEPTED SOLUTIONS

Try wrapping the prevdayfilter column in a selectedvalue(). Even if there is just 1 value and 1 column in a table you still cant refer directly to the table, instead you need to do an aggregation on the column to get the appropriate value. 

highlightRow = 
VAR Filter = SELECTEDVALUE( prevDayFilter[Column] )
Return
IF (SELECTEDVALUE(genscape_maintenance_events[updateDate]) >= Filter, 1,0)


/ J


Connect on LinkedIn

View solution in original post

Just choose select the column you want the table sorted by, then apply either asc or desc sorting:
Gif.gif
Whatever settings you have applied when you publish to Power BI Service will be the default for the users when they access the report. 

/ J


Connect on LinkedIn

View solution in original post

17 REPLIES 17

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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