Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hello Folks, I am brand new to Power bi and am trying to get through learning it. I wrote the following DAX formula - "Customer Order Amount = LOOKUPVALUE('Stock Inventory'[Unit Price],'Stock Inventory'[SKU ID],'Weekly Demand Sheet'[SKU ID])*'Weekly Demand Sheet'[Weeks Demand]) - I receive the following error - "A table of multiple values was supplied where a single value was expected" -
I am so frustrated (NOOBITIS) - I can't figure out how to fix this, so I can create my forecasting - can anyone help? I will be most grateful
Helen
Solved! Go to Solution.
Hi , @HEHuggins
According to your description, when you use the LOOKUPVALUE() function, an error is reported. Right?
For this function, if we use the associated field to match multiple values, it will report an error, and I reproduced this error through test data.
My test data is this:
Since we want to get the [Unit Price] field in the Stock Inventory table, but we have two values [SKU ID]=4 in the table, the engine cannot tell which value needs to be obtained, resulting in an error:
For the case of duplicate values, we need to choose the maximum or minimum value according to the actual needs, and we can use the following measures to solve this problem:
Column = var _cuurent_id = 'Weekly Demand Sheet'[SKU ID]
var _t= FILTER('Stock Inventory','Stock Inventory'[SKU ID]= _cuurent_id)
var _unit_price = MAXX(_t ,[Unit Price])
return
_unit_price
The result is as follows:
Best Regards,
Aniya Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
Hi , @HEHuggins
According to your description, when you use the LOOKUPVALUE() function, an error is reported. Right?
For this function, if we use the associated field to match multiple values, it will report an error, and I reproduced this error through test data.
My test data is this:
Since we want to get the [Unit Price] field in the Stock Inventory table, but we have two values [SKU ID]=4 in the table, the engine cannot tell which value needs to be obtained, resulting in an error:
For the case of duplicate values, we need to choose the maximum or minimum value according to the actual needs, and we can use the following measures to solve this problem:
Column = var _cuurent_id = 'Weekly Demand Sheet'[SKU ID]
var _t= FILTER('Stock Inventory','Stock Inventory'[SKU ID]= _cuurent_id)
var _unit_price = MAXX(_t ,[Unit Price])
return
_unit_price
The result is as follows:
Best Regards,
Aniya Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
I was wanting it to caluculate the demand - so weeks demand x unit price =
but I used this and then just added another column multiplying the two - so thank you 😄
Check out the July 2025 Power BI update to learn about new features.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
User | Count |
---|---|
17 | |
7 | |
7 | |
6 | |
5 |
User | Count |
---|---|
22 | |
10 | |
10 | |
9 | |
7 |