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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Fsciencetech
Helper III
Helper III

Dax 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 5
Fsciencetech
Helper III
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]))

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

 

PhilipTreacy
Super User
Super User

Hi @Fsciencetech 

What is the measure [MaxOsLastreplandate] returning?  Is it a table?

Regards

Phil



Did I answer your question? Then please mark my post as the solution.
If I helped you, click on the Thumbs Up to give Kudos.


Blog :: YouTube Channel :: Connect on Linkedin


Proud to be a Super User!


MaxOsLastreplandate = MAX(OSMSData[OSLastReplanDate])
 

MissPart measure gettiing correct result

 

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.