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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Anonymous
Not applicable

Highlighting duplicated values in table visual in Power BI

Hi everyone,

 

I'm having problem with using the conditional formatting to highlight the duplicated values in my table visual.

My data looks like this

Pheroxiz_0-1626658619767.png

To create the conditional formatting, I followed this forum Solved: how to highlight the duplicate cells in Power BI t... - Microsoft Power BI Community

This is my measure and the conditional formatting.

Pheroxiz_3-1626658878937.png

Pheroxiz_4-1626658898001.png

 

And I created the visual like this

Pheroxiz_1-1626658682222.png

However, when I changed the value of the date slicer from 1/1/2021 to 1/2/2021, the C is still highlighted.

Pheroxiz_2-1626658742948.png

This is the issue that I would like to solve, thank you in advance for your help.

 

1 ACCEPTED SOLUTION
Jihwan_Kim
Super User
Super User

Picture2.png

 

Rowcount : =
IF (
COUNTROWS (
CALCULATETABLE (
'Table',
ALLSELECTED ( 'Table' ),
VALUES ( 'Table'[Customer] )
)
) = 1,
0,
1
)
 
 
 
 

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

7 REPLIES 7
Sgriffiths2000
Regular Visitor

Hello, the conditional formatting works well, thanks!


But is it also possible to create a new column and assign a marker when a value multiple is found in a specific column?

 

Small capture below, I'd like to create a new column and add "double" when a multiple is found.

 

Sgriffiths2000_1-1655902746711.png

 

 

Jihwan_Kim
Super User
Super User

Picture2.png

 

Rowcount : =
IF (
COUNTROWS (
CALCULATETABLE (
'Table',
ALLSELECTED ( 'Table' ),
VALUES ( 'Table'[Customer] )
)
) = 1,
0,
1
)
 
 
 
 

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.

Hi, is there a way to filter out empty rows?

Anonymous
Not applicable

I would like to thank you a lot for your answer.

By the way, is it possible to make it highlight the duplicates of different customers with different colors? For example, the duplicates of A will be blue, and the duplicates of B will be pink.

Picture1.png

 

Rowcount ColorCondition : =
IF (
COUNTROWS (
CALCULATETABLE (
'Table',
ALLSELECTED ( 'Table' ),
VALUES ( 'Table'[Customer] )
)
) > 1,
SELECTEDVALUE(Customers[Color])
)
 
 
 

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.
Anonymous
Not applicable

@Jihwan_Kim 
Do we have a method that we don't have to create another column to assign color for each customer? Can we just use some randomized colors that are different?   

Hi,

Thanks for your feedback.

In my opinion, if the 'Customers' table in your model has a primary key column ( for example, ID column) that identifies each customer, then I think you can use that column to assign the random-color for each customer. If you do not have an ID column, then you can try to use the customer name to give a unique number to each customer, then you can use that unique number to assign a random-color for each customer.


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
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

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