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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
Mikahel369
Frequent Visitor

How to create alert if the value is present 2 times in the same column?

Hi there,

 

my need is to color 2 cells of the same column if they have the same value or anyway to make evident that there is a matching between 2 rows, for example:

 

REFCOLORTHAT
ABCTHISYES
DEF

THISNO

GHITHISYES

 

I think the solution should be in Select column and using a Count Distinct, in this way in presence of a double or more values I should know if this cell value is repeated, but I really don't know how to do that.

Please help.

thanks

1 ACCEPTED SOLUTION
Greg_Deckler
Super User
Super User

@Mikahel369 Perhaps a calculated column like this:

Count the Same Column =
  COUNTROWS(FILTER('Table',[COLORTHAT] = EARLIER(Table[COLORTHAT])))

Then a rule that if this column > 1, show as red.


Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

View solution in original post

3 REPLIES 3
Mikahel369
Frequent Visitor

As always happen to me, when I make the question I found the solution... and actually was still here but with another "title":

 

Solved: How to count the occurrence of values in a column ... - Microsoft Power BI Community

 

after created the measure I just created the conditional formatting over the new column (new measure) and over the cell it self that shown the same values.

 

May help someone else. 

Greg_Deckler
Super User
Super User

@Mikahel369 Perhaps a calculated column like this:

Count the Same Column =
  COUNTROWS(FILTER('Table',[COLORTHAT] = EARLIER(Table[COLORTHAT])))

Then a rule that if this column > 1, show as red.


Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

Ok great, this is even better than what I found.

Thanks

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel1

Power BI Monthly Update - May 2024

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

Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.