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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
jjoerger
Regular Visitor

Formatting

I have a viz which contains a table/many columns.  I want to highlight cells in a column where the value is the same as the value the row above/below it.  In this case a column not pictured here is common to both values needing to be highlighted.  In this example I have two dupes (4 cells) which would be highlighed.  Is this type of conditional formatting possible?

Highlight Dupes.PNG

2 ACCEPTED SOLUTIONS

A little more detail and still getting an error:

image.pngimage.png

Otherwise I understand the example and I think I'm close.  I'm excited as it looks like from your example it's possible.

View solution in original post

Hi @jjoerger,

 

Please try to change all the semicolon of your formula to comma.

 

Regards,

Frank

Community Support Team _ Frank
If this post helps, then please consider Accept it as the solution to help the others find it more quickly.

View solution in original post

5 REPLIES 5
matemusic
Advocate III
Advocate III

As I know, it is a bit complicated: First you have to know an order of rows - months for example.

 

After that, you can create new measure, which look for previous and next month.

 

For example, i created a month table with month numbers and added some values for each month. Then i created a measure test, which returns one or zero if in next or previous month number is the same. After that you can create conditional formating based on measure Test.

Test = 
VAR mnth = min(Months[Month]) --Check which value is in current month, it can be also average, max...
VAR x = CALCULATE(sum(Months[Numbers]);filter(all(Months);Months[Month]=mnth-1))
VAR y = CALCULATE(sum(Months[Numbers]);filter(all(Months);Months[Month]=mnth+1))
VAR crrnt = sum(Months[Numbers])
RETURN if(x=crrnt || y = crrnt;1;0) //if previous or next month is the same, then return 1 else return 0

Months.png

A little more detail and still getting an error:

image.pngimage.png

Otherwise I understand the example and I think I'm close.  I'm excited as it looks like from your example it's possible.

Hi @jjoerger,

 

Please try to change all the semicolon of your formula to comma.

 

Regards,

Frank

Community Support Team _ Frank
If this post helps, then please consider Accept it as the solution to help the others find it more quickly.

Ups, Euro style 🙂

Thank you kindly

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.