Quantcast
Channel: SQLServerCentral » Data Warehousing » Analysis Services » Latest topics
Viewing all articles
Browse latest Browse all 1341

Case statement error "The expression refers to multiple columns. Multiple columns cannot be converted to a scalar value. "

$
0
0
switchTest:=SWITCH('POEC Delivery Types', "MCS T&M", SUM([one thing]),'POEC Delivery Types', "Subcon T&M", SUM([another thing]),0)I'm trying to say that if the Fact column called POECDeliveryType has value "MCS T&M" then SUM([one thing]), and if the Fact column called POECDeliveryType has value "Subcon T&M", then SUM([another thing]), else use value 0.<error I get>The expression refers to multiple columns. Multiple columns cannot be converted to a scalar value. Can someone see what is the problem?

Viewing all articles
Browse latest Browse all 1341

Trending Articles