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
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.
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")
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With