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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
CGJoel
Regular Visitor

Vlookup value against a table array

Hello, 

 

I was hoping someone could assist me in figuring out a way to create a new column of pre-determined group names.

 

1. TABLE1: List of reviews of people using multiple words to describe their experience

2. TABLE2: List of review groups and multiple words underneath

 

I would like to create a new column in TABLE1 that creates a "review group" 

- it would search for keywords in TABLE1 ColumnA for a reference table in TABLE2 either columns and depending on the keywords, the new column will state "Positive" or "Negative"

 

Is that a possibility?

 

J.

1 REPLY 1
DataInsights
Super User
Super User

@CGJoel,

 

Try this calculated column in Table1:

 

Review Group = 
VAR vCurrentReview = Table1[Review]
VAR vPositiveWords =
    FILTER ( Table2, NOT ISBLANK ( Table2[Positive] ) )
VAR vPositiveMatch =
    SUMX ( vPositiveWords, SEARCH ( Table2[Positive], vCurrentReview, 1, 0 ) )
VAR vNegativeWords =
    FILTER ( Table2, NOT ISBLANK ( Table2[Negative] ) )
VAR vNegativeMatch =
    SUMX ( vNegativeWords, SEARCH ( Table2[Negative], vCurrentReview, 1, 0 ) )
VAR vResult =
    SWITCH (
        TRUE (),
        vPositiveMatch > 0
            && vNegativeMatch = 0, "Positive",
        vPositiveMatch = 0
            && vNegativeMatch > 0, "Negative",
        vPositiveMatch > 0
            && vNegativeMatch > 0, "Positive and Negative",
        vPositiveMatch = 0
            && vNegativeMatch = 0, "No match"
    )
RETURN
    vResult

 

DataInsights_0-1604857595073.png

 





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

Proud to be a Super User!




Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

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.