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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
zahidah_mabd
Helper I
Helper I

Check if duplicated unique value has mismatched values in other columns

Hi, 

I have two columns [Position ID] and [Position Location] in the table 'Position'.

 

There are some duplicates on the position ID. 

 

I have created a column to count the duplicates for position ID
Duplicated Position_Code =
Var Position_ID = [Position ID]
RETURN

CALCULATE(
COUNTROWS('Position'),
all('Position'),
'Position'[Position ID] = Position_ID
)

The output will show the number of times the Position ID is in the data.

 

So now I want to check if the duplicated position ID has the same location for each data or not.

This is an example of duplicated position ID data with multiple locations.

Position IDPosition LocationDuplicated Position_ID
1130New York3
1130New York3
1130Ohio3
1456Nashville2
1456Boston2


So basically the duplicated ID would be

Duplicated Position_ID <> 1

But im not sure how to get that measure.
Can anyone help me with this? 

1 ACCEPTED SOLUTION
ryan_mayu
Super User
Super User

@zahidah_mabd 

is this what you want?

Column = CALCULATE(COUNTROWS('Table'),FILTER('Table','Table'[Position ID]=EARLIER('Table'[Position ID])&&'Table'[Position Location]=EARLIER('Table'[Position Location])))

1.PNG





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




View solution in original post

3 REPLIES 3
ryan_mayu
Super User
Super User

@zahidah_mabd 

is this what you want?

Column = CALCULATE(COUNTROWS('Table'),FILTER('Table','Table'[Position ID]=EARLIER('Table'[Position ID])&&'Table'[Position Location]=EARLIER('Table'[Position Location])))

1.PNG





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




It wasnt what I was looking for at first, but I did find it useful and managed to  get the output that I want from your solution. Thank youuuu

you are welcome





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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.

Top Solution Authors
Top Kudoed Authors