Forum Discussion
Fsciencetech
Helper III
5 years agoDax Formula
Hi folks,
Here I want to result with camparing two fields but getting error "A table of multiple values was supplied where a single value was expected"
column = OSMSData[ComponentPartNumber]
Measure = [MissPart]
$Not expected to ship in month =
CALCULATE(
SUM(OBFact_Current[TotalOrderRevenue]),
FILTER(OBFact_Current,OBFact_Current[ExpectedToShipInMonth] = "N"
&& LOOKUPVALUE(OSMSData[ComponentPartNumber],OSMSData[SapSoli],OBFact_Current[SapSoli]) = FORMAT(OSMSData[MissPart],"General Number"))
)
MissPart =
CALCULATE(
MAX(
OSMSData[ComponentPartNumber]
),
FILTER(
OSMSData,OSMSData[OSLastReplanDate].[Date] = [MaxOsLastreplandate]
&& OSMSData[OSMaterialRecoveryDate].[Date] = MAX(OSMSData[OSMaterialRecoveryDate].[Date])
&& OSMSData[OSMaterialRecoveryDate].[Date] <> BLANK()
),
SUMMARIZE(OBFact_Current,OBFact_Current[CustomerDGKey])
)
5 Replies
- PhilipTreacy
Super User
- Fsciencetech
Helper III
MaxOsLastreplandate = MAX(OSMSData[OSLastReplanDate])- Fsciencetech
Helper III
MissPart measure gettiing correct result
- Fsciencetech
Helper III
Hi Phillp,
Please guide me, for misspart measure resultant single value, It should be only with filter. I don't want to max value of "ComponentPartNumber"
MissPart =CALCULATE(MAXX(OSMSData,OSMSData[ComponentPartNumber]),FILTER(OSMSData,// ALLEXCEPT(OSMSData,OSMSData[MaxOsLastreplandate1])OSMSData[OSMaterialRecoveryDate] = MAX(OSMSData[OSMaterialRecoveryDate])&& NOT(ISBLANK(OSMSData[OSMaterialRecoveryDate]))),SUMMARIZE(OBFact_Current,OBFact_Current[CustomerDGKey]),SUMMARIZE(OSMSData,OSMSData[MaxOsLastreplandate1]))MaxOsLastreplandate1 =CALCULATE(MAX(OSMSData[OSLastReplanDate]),ALLEXCEPT(OSMSData,OSMSData[ComponentPartNumber]))- v-easonf-msft
Community Support
Hi, Fsciencetech
Sorry, I didn't check any problems with the formula grammar.And I didn't know the expected result you want.
Where did you find the error,in the masure or in the calculated column?
Please check whether there is any abnormality in the use of the lookupvalue function in $Not expected to ship in month.
Best Regards,
Community Support Team _ Eason