Quantcast
Channel: SQL Server Analysis Services Forum
Viewing all articles
Browse latest Browse all 2472

Create a named Calcualtion

$
0
0

Hi all

I have column in my fact table has nvarchar data type

the column name is New/Used 

the value is N for New , U for Used car

I am trying to make a named calculatino for this column 

my named claculation syntax is

CASE
(select  ([New / Used]) from MyAuto_FactTable)
When 'N' then 'New'
When 'U' then 'Used'
END

when I applay this I got this error

Subquery returned more than 1 value. This is not permitted when the subquery follows =, !=, <, <= , >, >= or when the subquery is used as an expression.

#

Any suggestion ?

Thanks in advanced


Viewing all articles
Browse latest Browse all 2472

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>