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

July 28 - August 9 | Final Round of the Power BI Dataviz World Championships. This is your chance. Learn more

Reply
utsavlexmark
Helper III
Helper III

Lookup Value Query

Hello All,

I have 2 tables as follows:

Table 1

Month     Year             URL                         Unique Visitors(Search Engine)

 

 

Table 2

Month     Year             URL                         Unique Visitors(All sources)

 

I want to pull the "Unique Visitors(From all sources)" from Table 2 to Table 1 for the avaiable URLs of it.

LOOKUPVALUE('Table 2'[Unique Visitors(From all sources)],'Table 2'[URL],'Table 1'[URL])
This is the query I used, but it is showing error "A table of multiple values was supplied where a single value was expected".
What I can think of is as a particular URL is repeted in different months of different year - I am getting this error.
How can I solve the issue?
Regards
Utsav
1 ACCEPTED SOLUTION
Anonymous
Not applicable

Thank you raji_n 

Hi, @utsavlexmark 

Based on your description, I've created the following two tables:

table1:

vjianpengmsft_0-1724381899069.png

table2:

vjianpengmsft_1-1724381925685.png

Using the DAX expression you provided does bring up the problem you mentioned, as shown in the image below:

vjianpengmsft_2-1724381978876.png

To do this, I've changed the expression to look like this, and I've matched the corresponding 'Table 2'[Unique Visitors (All sources)] with the month by URL:

Column 2 = LOOKUPVALUE(
		'Table 2'[Unique Visitors (All sources)],
		'Table 2'[URL],
		'Table 1'[URL],
		'Table 2'[Month],
		'Table 1'[Month],
		0
	)

vjianpengmsft_3-1724382425808.png

I've provided the PBIX file used this time below.

 

 

Best Regards

Jianpeng Li

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

 

 

 

View solution in original post

3 REPLIES 3
Anonymous
Not applicable

Thank you raji_n 

Hi, @utsavlexmark 

Based on your description, I've created the following two tables:

table1:

vjianpengmsft_0-1724381899069.png

table2:

vjianpengmsft_1-1724381925685.png

Using the DAX expression you provided does bring up the problem you mentioned, as shown in the image below:

vjianpengmsft_2-1724381978876.png

To do this, I've changed the expression to look like this, and I've matched the corresponding 'Table 2'[Unique Visitors (All sources)] with the month by URL:

Column 2 = LOOKUPVALUE(
		'Table 2'[Unique Visitors (All sources)],
		'Table 2'[URL],
		'Table 1'[URL],
		'Table 2'[Month],
		'Table 1'[Month],
		0
	)

vjianpengmsft_3-1724382425808.png

I've provided the PBIX file used this time below.

 

 

Best Regards

Jianpeng Li

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

 

 

 

Hello,

This is working for me, but there is a small issue and I think you can guide me.

As per your suggestion - column 2 is working, but I had to select "Don't Summarize" option from setting. But if that happened - the total is not showing.

How to solve this?

Regards

Utsav

raji_n
Resolver II
Resolver II

@utsavlexmark use firstnonblank() to lookup, the error is due to availability of multiple matches for your keys

Helpful resources

Announcements
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

Fabric Community Sticker Design Challenge Barcelona Carousel

Fabric Community Sticker Challenge - Barcelona 2026

If you love stickers, then you will definitely want to check out our community sticker challenge, Barcelona edition!

July Power BI Update Carousel

Power BI Monthly Update - July 2026

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

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.

Top Solution Authors