Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.
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:
Strange enough when I just filter for one store it will return me actual results as intended, it follows my if statment perfectly.
However, if there is more than 1 store in the matrix table, the entire table fails and returns me this error....
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!
Solved! Go to Solution.
Looks like I found the answer to my own question. Needed to utilize both a SELECTEDVALUE and SWITCH statement instead of an IF statement:
Found by viewing this question below:
https://community.powerbi.com/t5/Desktop/IF-STATEMENT-USING-SELECTED-VALUE/td-p/2276166
Looks like I found the answer to my own question. Needed to utilize both a SELECTEDVALUE and SWITCH statement instead of an IF statement:
Found by viewing this question below:
https://community.powerbi.com/t5/Desktop/IF-STATEMENT-USING-SELECTED-VALUE/td-p/2276166