Forum Discussion
Adding missing date rows and filling in Quantity
Thanks for your suggestions.
I tried using [Date] with the EARLIER function and it gave me the error: "A table of multiple values was supplied where a single value was expected."
Also with the variables in your second suggestion, I got the same error: "A table of multiple values was supplied where a single value was expected."
It sounds like you're trying to define a measure or calculated column instead of a new table.
As a separate note, you may want to filter the calendar part if you only want one day per month. I.e.
FILTER (
CALENDAR (
MIN ( INVENTORY[Inv_Date] ),
MAX ( INVENTORY[Inv_Date] )
),
DAY ( [Date] ) = 1
)
- Anonymous4 years agoNot applicable
I created a table with the original query (Modeling > New table).
- AlexisOlson4 years agoSuper User
If you're indeed creating a calculated table, then the error likely means that there are [Inv_Date] associated with multiple values of [Quantity], which causes LOOKUPVALUE to fail since there isn't a unique value to return.
- Anonymous4 years agoNot applicable
hi again,
Yes I found the issue, thanks to your suggestion. There are multiple Inv_Date entries for a particular date. These entries have an associated System_Load_ID, and the goal is to take the Inv_Date with the highest System_Load_ID.
My question is: how do I set my filter into this query.
Previously I was using a similar filter as a column:
LatestSysytemLoadID =CALCULATE (MAX (INVENTORY[System_Load_ID]),ALLEXCEPT (INVENTORY, INVENTORY[Component], INVENTORY[Inv_Date]))Thanks in advance!