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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more

Reply
SparkDataGuru
Frequent Visitor

Error Returned: A table of Multiple Values was supplied where a single value was expected

Currently we have a Matrix table with a measure which determines what type of 'Goal' to use (between 'Manual' and 'Automatic') the objective is to return in the 3nd column 'Goal Returned'. Depending on whatever Goal Mode is set on the 2nd column will determine the output of the 'Goal Returned'

 

For the 'Goal Returned' measure I've written this in DAX: 

 

Decided_LeadInPeriod_New_Leads_Goal = IF(VALUES('Manual Goals - POWER BI DATA'[Goal Mode - New Vehicles])="Manual", [Sum_NewVehiclesManualGoal], Automatic_Goal_Measure[AutomaticGoal_Forecast_New_Leads])

 

 Goal Modes.png

 

Strange enough when I just filter for one store it will return me actual results as intended, it follows my if statment perfectly.Goal Modes - Auto.png

However, if there is more than 1 store in the matrix table, the entire table fails and returns me this error.... 

 

Goal Modes - ERROR.png

Does anyone know how I can implment the intended logic above without it returning an error? Any suggestions on how this can be solved? Thank you!

1 ACCEPTED SOLUTION
SparkDataGuru
Frequent Visitor

Looks like I found the answer to my own question. Needed to utilize both a SELECTEDVALUE and SWITCH statement instead of an IF statement: 

 

Decided_LeadInPeriod_New_Leads_Goal =
SWITCH(
    SELECTEDVALUE('Manual Goals - POWER BI DATA'[Goal Mode - New Vehicles]),
    "Manual",'Manual Goals - POWER BI DATA'[Sum_NewVehiclesManualGoal],
    "Automatic", Automatic_Goal_Measure[AutomaticGoal_Forecast_New_Leads]
)

 

Found by viewing this question below: 

https://community.powerbi.com/t5/Desktop/IF-STATEMENT-USING-SELECTED-VALUE/td-p/2276166

View solution in original post

1 REPLY 1
SparkDataGuru
Frequent Visitor

Looks like I found the answer to my own question. Needed to utilize both a SELECTEDVALUE and SWITCH statement instead of an IF statement: 

 

Decided_LeadInPeriod_New_Leads_Goal =
SWITCH(
    SELECTEDVALUE('Manual Goals - POWER BI DATA'[Goal Mode - New Vehicles]),
    "Manual",'Manual Goals - POWER BI DATA'[Sum_NewVehiclesManualGoal],
    "Automatic", Automatic_Goal_Measure[AutomaticGoal_Forecast_New_Leads]
)

 

Found by viewing this question below: 

https://community.powerbi.com/t5/Desktop/IF-STATEMENT-USING-SELECTED-VALUE/td-p/2276166

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

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.

Top Solution Authors