SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


New Column with numbers


New Column with numbers

Author
Message
akirajt
akirajt
SSC-Enthusiastic
SSC-Enthusiastic (150 reputation)SSC-Enthusiastic (150 reputation)SSC-Enthusiastic (150 reputation)SSC-Enthusiastic (150 reputation)SSC-Enthusiastic (150 reputation)SSC-Enthusiastic (150 reputation)SSC-Enthusiastic (150 reputation)SSC-Enthusiastic (150 reputation)

Group: General Forum Members
Points: 150 Visits: 191
Goal:
Create a new column, named test , containing numbers in SSAS only inside of DSV design view.

If StatePrinceCode's column has value NSW it shall have value 1 etc.


StateProvinceCode test
------------------------------
NSW 1
QLD 2
SA 3



Problem:
How should I enable to do it? I tried using IIF and case statement but it doesn't want to do it due to text value. It only works with numbers only.

Information:
- I strongly believe that you need to create a named calculation as a extra column to add the value

The new column shall apply in the table Geography in SSAS.
In this context no usage of SQL server database
Attachments
picture1.png (6 views, 92.00 KB)
picture2.png (5 views, 151.00 KB)
PB_BI
PB_BI
SSCarpal Tunnel
SSCarpal Tunnel (4.5K reputation)SSCarpal Tunnel (4.5K reputation)SSCarpal Tunnel (4.5K reputation)SSCarpal Tunnel (4.5K reputation)SSCarpal Tunnel (4.5K reputation)SSCarpal Tunnel (4.5K reputation)SSCarpal Tunnel (4.5K reputation)SSCarpal Tunnel (4.5K reputation)

Group: General Forum Members
Points: 4530 Visits: 2745
akirajt (11/6/2013)

Problem:
How should I enable to do it? I tried using IIF and case statement but it doesn't want to do it due to text value. It only works with numbers only.


Could you explain this problem with more detail please - what is the column for? why must it be an integer?




I'm on LinkedIn
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search