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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Andrew_na_lang
Helper IV
Helper IV

Identify if the customer has duplicate accounts from different origin and if completed an order

Hello, Team.

I made a table in which I counted how many times a phone number appeared in the same column more than once. These customers signed up using the same phone number but from different origins. Ideally, we need to identify who these customers are, because a customer should only have one profile, regardless of origin. Also, we need to know who has multiple profiles and has completed at least one order on both origins.

Customers table:

Screenshot 2023-02-03 145835.png

The last column on the right is my desired output on Power Bi. 

Your help is much appreciated.

1 ACCEPTED SOLUTION
tamerj1
Super User
Super User

Hi @Andrew_na_lang 
Please refer to attached sample file with the solution

1.png2.png

PHONE NUMBER APPEARED MORE THAN ONCE = 
IF ( 
    COUNTROWS ( 
        CALCULATETABLE (
            'Table',
            ALLEXCEPT ( 'Table', 'Table'[Phone number =] )
        )
    ) > 1,
    "Y",
    "N"
)
NUMBER APPEARED TWICE and COMPLETED AN ORDER ON BOTH = 
IF (
    COUNTROWS ( 
        CALCULATETABLE ( 
            VALUES ( 'Table'[Origin] ),
            ALLEXCEPT ( 'Table', 'Table'[Phone number =] ),
            'Table'[TOTAL ORDER] <> BLANK ( )
        )
    ) > 1,
    "Y",
    "NO"
)

View solution in original post

1 REPLY 1
tamerj1
Super User
Super User

Hi @Andrew_na_lang 
Please refer to attached sample file with the solution

1.png2.png

PHONE NUMBER APPEARED MORE THAN ONCE = 
IF ( 
    COUNTROWS ( 
        CALCULATETABLE (
            'Table',
            ALLEXCEPT ( 'Table', 'Table'[Phone number =] )
        )
    ) > 1,
    "Y",
    "N"
)
NUMBER APPEARED TWICE and COMPLETED AN ORDER ON BOTH = 
IF (
    COUNTROWS ( 
        CALCULATETABLE ( 
            VALUES ( 'Table'[Origin] ),
            ALLEXCEPT ( 'Table', 'Table'[Phone number =] ),
            'Table'[TOTAL ORDER] <> BLANK ( )
        )
    ) > 1,
    "Y",
    "NO"
)

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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

Top Solution Authors