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


Create one decimal only in specific area


Create one decimal only in specific area

Author
Message
akirajt
akirajt
SSC Journeyman
SSC Journeyman (76 reputation)SSC Journeyman (76 reputation)SSC Journeyman (76 reputation)SSC Journeyman (76 reputation)SSC Journeyman (76 reputation)SSC Journeyman (76 reputation)SSC Journeyman (76 reputation)SSC Journeyman (76 reputation)

Group: General Forum Members
Points: 76 Visits: 191
Goal:
Make the column [Internet Average Unit Price], [Internet Sales Amount] and [Internet Total Product Cost] with Arizona area to have one decimal only. The remaining numbers in different City, State province to have non decimal value.

Problem:
I tried finding a solution for it but I failed.

Information:
*Using AdventureWorks DW 2012 multidimensional
*The datasource is SSAS.
*The list in the picture is not before affected in format. In other words, it is raw data from SSAS.
Attachments
picture.png (7 views, 171.00 KB)
picture2.png (8 views, 122.00 KB)
Paul Keys
Paul Keys
Mr or Mrs. 500
Mr or Mrs. 500 (517 reputation)Mr or Mrs. 500 (517 reputation)Mr or Mrs. 500 (517 reputation)Mr or Mrs. 500 (517 reputation)Mr or Mrs. 500 (517 reputation)Mr or Mrs. 500 (517 reputation)Mr or Mrs. 500 (517 reputation)Mr or Mrs. 500 (517 reputation)

Group: General Forum Members
Points: 517 Visits: 1843
Hi,

This can be done by using an expression on the format property for each of the 3 fields required.

The expression for the format property would be something like;

=iif(Fields!State_Province.Value="Arizona","N1","N0")

This would fix the format for 1dp for the Arizona group and 0dp for everything else.
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