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

Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now

Reply
Reddyp
Helper I
Helper I

look up based on one variable

"quanity" (sheet 1) where "Location" = USA (Sheet 2) = quantity (in new column)

and when location dosent match, the result should be blank 

QuantityLocationDesired Result
10USA10
30NZ 
22IND 
40USA40
5 REPLIES 5
Reddyp
Helper I
Helper I

@truptis Please help

Hi @Reddyp 

 

Is there any update on this problem? Have you solved it? You can share your solution here to help other users who may have similar problems. 

 

Best Regards,
Community Support Team _ Jing

amitchandak
Super User
Super User

@Reddyp , Try a measure like

Sumx(Table, if( Table[Location] ="USA" , [Quantity],0) )

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

@amitchandak I am not looking for SUM or SUMX and Both quantity and Location are on different tabels. 
& I dont want true or false
Please check my example 

Quantity(table 1)Location (table 2)Desired Result
10USA10
30NZ 
22IND 
40USA40



Hi @Reddyp 

 

Are you displaying Quantity and Location columns from different tables into a table visual currently? If your purpose is to add the third column to the same table visual, you can create a measure with below code

Desired Result =
IF (
    SELECTEDVALUE ( 'Sheet 2'[Location] ) = "USA",
    SELECTEDVALUE ( 'Sheet 1'[Quantity] )
)

 

If this cannot get what you want, can you show how Sheet 1 and Sheet 2 look like with some dummy data and tell us which columns are for matching? Is there any relationship created between two tables? And you want the result for all matching locations or only for USA? Where did you want to export the result, in a table visual or in a new table?

 

Best Regards,
Community Support Team _ Jing
If this post helps, please Accept it as Solution to help other members find it.

Helpful resources

Announcements
Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.