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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more

Reply

Measure to lookup value in table based on slicer value

I have the below table loaded into PowerBI, with a slicer on the canvas for 'Site Name'.

 

I want to create a measure that looksup the country associated with whatever site name is selected in the slicer.

 

Any ideas on how I can do this?

 

Site NameCountryRegion
Site AUKEMEA
Site BUSAAmericas
Site CFranceEMEA
Site DGermanyEMEA
1 ACCEPTED SOLUTION

Try:

Selected Country = SELECTEDVALUE('Table'[Country])

If that doesn't work, could you share a demo .Pbix?

View solution in original post

6 REPLIES 6
MahyarTF
Memorable Member
Memorable Member

Hi,

I am a bit misunderstanding, 

Do you want to show the Country when the SiteName is selected in the slicer?

if yes, why you are looking for Lookup, it is a simple slicer on a particular column.

if No, would you please let me know what your mean is (with a sample Please )?

Mahyartf
Ale
Resolver II
Resolver II

If you have only 1 Country for each Site Name, then you don't need any logic behind it. Just use the Country field and it will show the respective country whenever a particular site is selected in the slicer.

Hi - I massively simplified the table, the real table has 400 sites and about 85 countries. So would still need the logic I'm seeking, unfortunately. Also, it needs to be captured in a measure, because I intend on targeting that measure in subsequent measures.

The number of sites won't matter here as long as 1 site has only 1 country assigned to it. The issue would be only in case there are more than 1 country for the same site (which I think it's not the case here).

 

With that said, again, you don't need a sophisticated logic. Simply create a measure that takes the [Country] field.

How do I do that? I've tried FIRSTNONBLANKVALUE but can't get it working

Try:

Selected Country = SELECTEDVALUE('Table'[Country])

If that doesn't work, could you share a demo .Pbix?

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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.

Top Solution Authors