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!The Power BI Data Visualization World Championships is back! It's time to submit your entry. Live now!
Hi,
I am getting error "The Expression Refers to Multiple Columns. Multiple Columns Cannot Be Converted to a Scalar Value."
in below function
Solved! Go to Solution.
Hi @Anonymous
I think you'd be better off using the SELECTEDVALUE function, as per below.
Select Metric =
VAR SelMetric = SELECTEDVALUE ( 'Metric ' )
VAR Result =
SWITCH (
TRUE (),
SelMetric = "Sales($)", ROUND ( [Select Sales], 0 ),
SelMetric = "Vol", ROUND ( [Select Trans], 0 ),
SelMetric = "customers", ROUND ( [Cust], 0 ),
SelMetric = "Sales Conversion(%)", ROUND ( [Sales Conversion], 0 ),
SelMetric = "AVG VOL($)", ROUND ( [Avg Vol], 0 ),
SelMetric = "Exit", ROUND ( [Exit], 0 ),
BLANK ()
)
RETURN
Result
Best regards,
Martyn
Hi @Anonymous
I think you'd be better off using the SELECTEDVALUE function, as per below.
Select Metric =
VAR SelMetric = SELECTEDVALUE ( 'Metric ' )
VAR Result =
SWITCH (
TRUE (),
SelMetric = "Sales($)", ROUND ( [Select Sales], 0 ),
SelMetric = "Vol", ROUND ( [Select Trans], 0 ),
SelMetric = "customers", ROUND ( [Cust], 0 ),
SelMetric = "Sales Conversion(%)", ROUND ( [Sales Conversion], 0 ),
SelMetric = "AVG VOL($)", ROUND ( [Avg Vol], 0 ),
SelMetric = "Exit", ROUND ( [Exit], 0 ),
BLANK ()
)
RETURN
Result
Best regards,
Martyn
Excellent Mate, Thanks Much
The Power BI Data Visualization World Championships is back! It's time to submit your entry.
Check out the January 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 61 | |
| 49 | |
| 30 | |
| 25 | |
| 23 |
| User | Count |
|---|---|
| 128 | |
| 102 | |
| 57 | |
| 39 | |
| 31 |