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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
Anonymous
Not applicable

Help needed for supplier alignment checking column in Power BI desktop

Hi,

Please consider the following table:

PackageProjectSupplier
1100A1X

1100

A2X
1100C1Y
1100A3 
2200P1X

 

The request I got is to show if the group of projects (A1, A2, A3) get same vendors assigned on the tool, but for some reason, if the project in the group doesn't have the same supplier (as shown above, A3 has no assigned supplier) then in a new column I should show an expected supplier to be assigned on the project.

The other case would be if the A3 had another supplier (ex: A3 supplier assigned is Y) then the new column should show me, mismatch supplier.

 

1 ACCEPTED SOLUTION
v-luwang-msft
Community Support
Community Support

Hi @Anonymous ,

You need to create the following column:

P1 = LEFT('Table'[Project],1)
P1 = LEFT('Table'[Project],1)
maxcount1 = 
IF (
    'Table'[count1]
        = MAXX (
            FILTER ( 'Table', 'Table'[P1] = EARLIER ( 'Table'[P1] ) ),
            'Table'[count1]
        ),
    "match",
    IF (
        'Table'[count1]
            <> MAXX (
                FILTER ( 'Table', 'Table'[P1] = EARLIER ( 'Table'[P1] ) ),
                'Table'[count1]
            )
            && 'Table'[Supplier] = BLANK (),
        CALCULATE (
            MAX ( 'Table'[Supplier] ),
            FILTER (
                ALL ( 'Table' ),
                'Table'[P1] = EARLIER ( 'Table'[P1] )
                    && 'Table'[count1]
                        = MAXX ( FILTER ( 'Table', 'Table'[P1] = EARLIER ( 'Table'[P1] )),'Table'[count1]))),"mismatch" 
            )
        )
    

Output refer:

vluwangmsft_0-1647854173095.png

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


Best Regards

Lucien

View solution in original post

2 REPLIES 2
v-luwang-msft
Community Support
Community Support

Hi @Anonymous ,

You need to create the following column:

P1 = LEFT('Table'[Project],1)
P1 = LEFT('Table'[Project],1)
maxcount1 = 
IF (
    'Table'[count1]
        = MAXX (
            FILTER ( 'Table', 'Table'[P1] = EARLIER ( 'Table'[P1] ) ),
            'Table'[count1]
        ),
    "match",
    IF (
        'Table'[count1]
            <> MAXX (
                FILTER ( 'Table', 'Table'[P1] = EARLIER ( 'Table'[P1] ) ),
                'Table'[count1]
            )
            && 'Table'[Supplier] = BLANK (),
        CALCULATE (
            MAX ( 'Table'[Supplier] ),
            FILTER (
                ALL ( 'Table' ),
                'Table'[P1] = EARLIER ( 'Table'[P1] )
                    && 'Table'[count1]
                        = MAXX ( FILTER ( 'Table', 'Table'[P1] = EARLIER ( 'Table'[P1] )),'Table'[count1]))),"mismatch" 
            )
        )
    

Output refer:

vluwangmsft_0-1647854173095.png

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


Best Regards

Lucien

lbendlin
Super User
Super User

Those cases are identical. "No supplier"  is the same as "Different Supplier"

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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

Top Solution Authors