Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to set thousands separator for a column in ssas tabular model

I have created cube using SSDT Tools 2017,which has below columns

Sales Amount        Stock Amount
2000                  5000

I would like to change above column data type as comma separated as below

Sales Amount        Stock Amount
2,000                  5,000
like image 915
saij Avatar asked Oct 31 '25 13:10

saij


2 Answers

You need to adjust the [Data Format] property and the show [Thousand Seprator]. Within your project select your measure and you will be able to see the above in the properties window.

like image 145
MoazRub Avatar answered Nov 03 '25 04:11

MoazRub


A calculated column with the DAX FORMAT function can be used to define a custom format. In this instance, "#,0" is used for the second parameter to create a thousand separator which is a comma and use no decimal or numbers to the right of it, as indicated in your question. Be aware a calculated column will add additional overhead to the tabular model. You avoid adding this by using the Decimal Number option for the Data Format property. This can be changed in SSDT by selecting the column and viewing the properties (press F4), finding the Data Format field and choosing the Decimal Number option, however this will still include a decimal, which from your question doesn't look like the desired format.

FORMAT(Fact Table[Sales Amount], "#,0")
like image 20
userfl89 Avatar answered Nov 03 '25 04:11

userfl89



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!