Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Hi all,
I am ccurrently working on a project in BI and am running into an issue. Basically I am trying to get a value in one table into another table based on a date and a vendor. I have been trying to use a lookupvalue function, but seem to be running into issues for some reason and keep getting an error that says "a table of multiple values was supplied where a single value was expected." Basically I have a table with every single date of 2024 and for every date there is 10 items that a price value gets entered into every day. I assumed I would be able to match the correct price by doing a lookupvalue with the name of the item and the date, but I am running into issues.
Here is a picture of my price table to help visualize.
Also here is an image of my error.
If anyone has any suggestions/solutions, please let me know.
Thanks!
Solved! Go to Solution.
Hi @Anonymous
Please try this:
Here I create a set of sample:
Table:
Tbale 2:
Then add a measure:
MEASURE =
VAR _currentDate =
MAX ( 'Table 2'[Table_Date] )
VAR _currentItem =
SELECTEDVALUE ( 'Table 2'[Table_Market Item] )
RETURN
SUMX (
FILTER (
'Table',
'Table'[Date] = _currentDate
&& 'Table'[Market Item] = _currentItem
),
'Table'[Price]
)
The result is as follow:
It's worth noting that there are no relationship between the 2 tables:
Best Regards
Zhengdong Xu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Anonymous
Please try this:
Here I create a set of sample:
Table:
Tbale 2:
Then add a measure:
MEASURE =
VAR _currentDate =
MAX ( 'Table 2'[Table_Date] )
VAR _currentItem =
SELECTEDVALUE ( 'Table 2'[Table_Market Item] )
RETURN
SUMX (
FILTER (
'Table',
'Table'[Date] = _currentDate
&& 'Table'[Market Item] = _currentItem
),
'Table'[Price]
)
The result is as follow:
It's worth noting that there are no relationship between the 2 tables:
Best Regards
Zhengdong Xu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 19 | |
| 13 | |
| 9 | |
| 4 | |
| 4 |
| User | Count |
|---|---|
| 30 | |
| 27 | |
| 17 | |
| 11 | |
| 10 |