DOLLARFR

Updated on

DOLLARFR is a DAX function that converts a decimal dollar price into an integer and fraction format.

Syntax

DOLLARFR(
   Decimal_dollar,
   Fraction
)
Argument Properties Description
Decimal_dollar A decimal number.
Fraction The integer to use in the denominator of the fraction.

Return Values

The fractional value of decimal_dollar, expressed as an integer part and a fraction part.

Remarks

  • fraction is rounded to the nearest integer.

  • An error is returned if:

    • fraction < 1.
  • This function is not supported for use in DirectQuery mode when used in calculated columns or row-level security (RLS) rules.

Example

The following DAX query:

EVALUATE
{
  DOLLARFR(1.125, 16)
}

Returns 1.02, read as 1 and 2/16, which is the corresponding fraction price of the original decimal price, 1.125. Since the fraction value is 16, the price has a precision of 1/16 of a dollar.

Other functions related to DOLLARFR are:

Contribute » | Contributors: Rick de Groot
Microsoft documentation: https://learn.microsoft.com/en-us/dax/dollarfr-function-dax

2023-2024 © BI Gorilla. All rights are reserved. Information from Microsoft docs is property of Microsoft Corp. | Privacy Policy