Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
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
Check out the July 2025 Power BI update to learn about new features.
User | Count |
---|---|
73 | |
72 | |
38 | |
30 | |
26 |
User | Count |
---|---|
99 | |
87 | |
45 | |
43 | |
37 |