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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
TylerVono
Helper III
Helper III

Column Comparison - Vlookup

I have two columns I need to compare, one column: 'MOM Stocking Report': Shows all stocked items & 'Demand Seg': Shows the complete list of purchased items.

 

I need to compare them against one another to know which ones are stocked and which are not.

 

As you can see the equation below, it appears to get me halfway there as the pie chart does capture the data, however I am not certain this is correct, Also when I click on the 'YES' stocked pie chart, the table shows nothing. Also, technically the 'Agreement Level' should be a 0 if 'Not Stocked' or come back with null.

 

My relationship cardinality is at Many to Many , it wont let me change- I have removed all duplicates from Power Query. So I am basically out of ideas:

 

TylerVono_0-1680922195340.png

 

 

My Stock or Not Equation:

Stocking Agreement? = if(isblank(countx(filter('MOM Stocking Report','MOM Stocking Report'[Item Number]='Demand Seg'[ITEM NUMBER]),'MOM Stocking Report'[Item Number])),"YES","NO")

 

 

TylerVono_2-1680922195707.png

 

 

 

 

2 REPLIES 2
tamerj1
Super User
Super User

Hi @TylerVono 
Please try

Stocking Agreement? =
IF (
    ISEMPTY (
        FILTER (
            RELATEDTABLE ( 'MOM Stocking Report' ),
            'MOM Stocking Report'[Item Number] = 'Demand Seg'[ITEM NUMBER]
        )
    ),
    "YES",
    "NO"
)

Hi There Tamerj1, I tried the equation and the same thing happens, the 'YES' result will not show up on the table, I dont think they're comparing against one another. See below, do you have any other ideas? I have a Many to Many cardinality for 'Item Number', it says there are duplicates but as you can see I removed them:

 

TylerVono_1-1680963478140.pngTylerVono_2-1680963503451.png

 

 

TylerVono_0-1680963049460.png

 

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.