How To Add Comma In Power Bi

To add a comma in Power BI, you can use the FORMAT function in DAX (Data Analysis Expressions). This function allows you to format a value based on a specified format string.

For example, let’s say you have a measure called “SalesAmount” that calculates the total sales amount. You can use the FORMAT function to add a comma to this measure.

    
      SalesAmountFormatted = FORMAT(SalesAmount, "#,##0")
    
  

In the above example, the “#,##0” format string specifies that the number should be formatted with a comma as the thousand separator.

You can also customize the format string further. For instance, if you want to include a decimal point and two decimal places in addition to the comma, you can use the following format string:

    
      SalesAmountFormatted = FORMAT(SalesAmount, "#,##0.00")
    
  

The above format string will display the sales amount with a comma as the thousand separator and two decimal places.

Same cateogry post

Leave a comment