如何在SSAS表格模型设置列千位分隔符及SSDT 2017多维数据集格式调整
Adding Thousand Separators to SSAS Multidimensional (SSDT 2017) and Tabular Models
Hey there! Let's walk through how to format your Sales Amount (2000 → 2,000) and Stock Amount (5000 → 5,000) with thousand separators, whether you're working with the multidimensional cube you built in SSDT 2017 or an SSAS Tabular model.
For SSDT 2017 Multidimensional Cubes
If you're dealing with measures (like your Sales/Stock Amount) or dimension columns, here's what to do:
- Open your cube project and head to the Cube Structure tab. Locate the Sales Amount and Stock Amount measures (or columns) you want to adjust.
- Right-click the target measure/column and select Properties to open the properties pane.
- Look for the FormatString property in the pane. Enter one of these format codes based on your needs:
#,0→ Displays whole numbers with thousand separators (e.g., 2000 → 2,000)#,0.00→ Use this if you need to retain two decimal places (e.g., 2000.50 → 2,000.50)
- Save your project, redeploy the cube, and you’ll see the formatted values when querying or using the cube in tools like Excel or Power BI.
For SSAS Tabular Models
Setting up thousand separators here is just as straightforward, with two easy options:
Option 1: Using the Format Menu
- Open your Tabular model project and switch to the Data View.
- Find the Sales Amount and Stock Amount columns. Right-click a column, then select Format, or use the Format dropdown in the top Column menu tab.
- In the formatting window, pick the Number category, check the box for Use thousand separator, and tweak decimal places if necessary.
Option 2: Using the FormatString Property
- Right-click the target column and choose Properties.
- In the properties pane, locate FormatString and enter
#,0or#,0.00(same as the multidimensional approach) for direct formatting control. - Save and deploy your model—your columns will now show values with thousand separators in any connected reporting tool.
内容的提问来源于stack exchange,提问作者saij
相关产品推荐
相关产品推荐

