Daily DAX : Day 465 ISDECIMAL

DAX ISDECIMAL Function

ISDECIMAL checks if a value has the decimal number data type in Power BI (also known as fixed-precision decimal / currency type).

Syntax

ISDECIMAL ( <value> )
ParameterDescription
<value>The expression or column value to test

Return Value

  • TRUE → value is a decimal number (fixed decimal / Currency type)
  • FALSE → value is anything else (whole number, float/double, text, date, blank, etc.)

Important Notes

  • ISDECIMAL is just another name (alias) for ISCURRENCY
  • In Power BI, "Decimal Number" usually means floating point (Double), while Fixed Decimal Number = Currency type = what ISDECIMAL detects
  • Not supported in DirectQuery mode (calculated columns or RLS rules)

Common Use Cases

1. Clean mixed imported data (most common real-world use)

ValidCurrency = 
IF(
    ISDECIMAL ( 'Sales'[Amount Imported] ),
    'Sales'[Amount Imported],
    BLANK()
)

→ Only keeps values that are real decimal/currency type

2. Different formatting or calculation based on data type

Formatted Amount = 
SWITCH(
    TRUE(),
    ISDECIMAL ( [Value] ), FORMAT ( [Value], "$#,##0.00" ),
    ISNUMBER  ( [Value] ), FORMAT ( [Value], "#,##0" ),
    "–"
)

3. Detect legacy imported "money" columns

IsLegacyCurrencyColumn = 
ISDECIMAL ( SELECTEDVALUE ( 'Fact'[Legacy Amount] ) )

→ Helps identify columns that came in as fixed-decimal instead of float

Quick Comparison Table

Function Returns TRUE for Typical Use
ISNUMBERAny number (Integer + Decimal + Float)General number check
ISDECIMAL / ISCURRENCYOnly fixed decimal (Currency type)Detect money/precision columns
ISINT64Whole numbers (64-bit integer)Check pure integers


Comments

Popular posts from this blog

Daily DAX : Day 131 SELECTEDMEASURE

Daily DAX : Day 191 MROUND

Daily DAX : Day 142 COLLAPSEALL