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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

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
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.

Top Solution Authors