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

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

Reply
Anonymous
Not applicable

Custom Column to show duplicates with condition

As per screenshot, I need a custom column to show duplicates on the JobID+Ticket column, based on the following conditions:

  • if JobID+Ticket contains duplicate, return "Yes" else "No"
  • if TICKET_NBR is blank, return "No"

Screenshot 2021-11-02 182800.jpg

1 ACCEPTED SOLUTION
VahidDM
Super User
Super User

Hi @Anonymous 

 

Try this measure:

Column =
VAR _Disc =
    CALCULATE (
        COUNTROWS ( 'Table' ),
        FILTER (
            ALL ( 'Table' ),
            'Table'[JOBID+Ticket] = EARLIER ( 'Table'[JOBID+Ticket] )
        )
    )
RETURN
    IF ( ISBLANK ( 'Table'[TICKET_NBR] ) || _Disc = 1, "No", "Yes" )

 

Output:

 

VahidDM_0-1635889807983.png

 

 

If this post helps, please consider accepting it as the solution to help the other members find it more quickly.

Appreciate your Kudos!!

 

View solution in original post

4 REPLIES 4
VahidDM
Super User
Super User

Hi @Anonymous 

 

Try this measure:

Column =
VAR _Disc =
    CALCULATE (
        COUNTROWS ( 'Table' ),
        FILTER (
            ALL ( 'Table' ),
            'Table'[JOBID+Ticket] = EARLIER ( 'Table'[JOBID+Ticket] )
        )
    )
RETURN
    IF ( ISBLANK ( 'Table'[TICKET_NBR] ) || _Disc = 1, "No", "Yes" )

 

Output:

 

VahidDM_0-1635889807983.png

 

 

If this post helps, please consider accepting it as the solution to help the other members find it more quickly.

Appreciate your Kudos!!

 

Anonymous
Not applicable

@VahidDM, perfect that worked. Thank you.

amitchandak
Super User
Super User

@Anonymous ,

a new column=

var _cnt = countx(filter(Table,[JobID+Ticket] =earlier([JobID+Ticket]) ),[JobID+Ticket])+0

return

if(isbalnk([TICKET_NBR]) && _cnt <=1 , "No", "Yes")

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
Anonymous
Not applicable

Hi @amitchandak , thanks but it doesn't look right as its only showing all "Yes"

@VahidDM, any suggestions please?

Screenshot 2021-11-02 223354.jpg

Helpful resources

Announcements
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.