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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
Anonymous
Not applicable

How to Select rows that has same value for certain columns, and different value for one column

Hello !

I am in a trouble finding a calculated column or measure that Select every rows that has the same value for the 3 columns Bank account, info 1 & info 2 AND when the Supplier is different (it shouldn't happen, thats why I want to detect these anomalies). To make it more clear, here is an example of what I should have with my measure:

Supplier     Bank account   info 1      info 2
A1000FranceEnergy
B1000FranceEnergy
C1000ChinaOil
A1000FranceGaz


The query should return these rows because these 2 suppliers have the same bank account number and same informations (this is an anomaly):

Supplier   Bank account        info 1    info2      
A1000FranceEnergy
B1000FranceEnergy
3 REPLIES 3
Jihwan_Kim
Super User
Super User

Picture1.png

 

Flag CC =
IF (
COUNTROWS (
FILTER (
Info,
Info[Supplier] <> EARLIER ( Info[Supplier] )
&& Info[Bank account] = EARLIER ( Info[Bank account] )
&& Info[info 1] = EARLIER ( Info[info 1] )
&& Info[info 2] = EARLIER ( Info[info 2] )
)
) >= 1,
1,
BLANK ()
)

 

 

https://www.dropbox.com/s/9cqlb3qbhp3pfxp/basbas.pbix?dl=0 

 

 


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

Hello @Jihwan_Kim 

 

I have an issue with this query when I have more than around 5000 rows, it takes too much time and it ends up with a "Memory error, try again when you have more memory available".

 

Do you know how can I solve this problem ?

 

Thank you !

Anonymous
Not applicable

Thank you it works,

I have another question, do you know how to do the contrary, like one supplier has several lines that aren't composed of the same informations ?
Here it would show the two lines about supplier A:

Supplier     Bank account   info 1      info 2
A1000FranceEnergy
A1000FranceGaz

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

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.