63.2k views
0 votes
The DAX FORMAT function accepts a number of different strings format, some of which can be constructed to create a custom formatter for your exact needs. Study the DAX expression below and choose the right result: FORMAT(-5, "#,##0.00;(#,##0.00)")? 1) 5.00 2) (5.00) 3) (500.00) 4) 5,000.00

1 Answer

4 votes

Final answer:

The DAX FORMAT function will format the given number as (5.00). The correct option is 2.

Step-by-step explanation:

The DAX FORMAT function allows you to apply custom formatting to numbers in Power BI. In the given DAX expression, FORMAT(-5, "#,##0.00;(#,##0.00)") the number -5 will be formatted according to the provided string format.

  1. The format contains a positive pattern "#,##0.00" which formats a positive number with commas as thousand separators and two decimal places. Therefore, the positive value 5 will be formatted as 5.00.
  2. The format also contains a negative pattern "(#,##0.00)" which formats a negative number with parentheses and the same comma and decimal formatting. Therefore, the negative value -5 will be formatted as (5.00).

So, the correct result for the given DAX expression is option 2) (5.00).

User FacundoGFlores
by
7.8k points
Welcome to QAmmunity.org, where you can ask questions and receive answers from other members of our community.