Forum Discussion

Avermaak's avatar
Avermaak
Helper I
4 years ago
Solved

DAX comparison operations do not support comparing values of type Text with values of type Integer

Good day,

 

I am having some trouble with a formula, I am trying to add the fiscal year as a column but get this error: 

*DAX comparison operations do not support comparing values of type Text with values of type Integer. Consider using the VALUE or FORMAT function to convert one of the values.

 

Here is the formula and table:

Financial Year =
VAR CY =
RIGHT ( YEAR ( 'Date Table'[Date] ), 4 )
VAR LY =
RIGHT ( YEAR ( 'Date Table'[Date] - 1 ), 2 )
VAR NY =
RIGHT ( YEAR ( 'Date Table'[Date] = 1 ), 2 )
VAR FISCALYEAR =
IF ( MONTH ( 'Date Table'[Date] >= 6 ), CY & NY, LY & CY )
RETURN
FISCALYEAR
 
  • Your Date column is in Text format not Date format. Select Date column - And choose Data type as Date.

    Then your formula would work

3 Replies

  • Vijay_A_Verma's avatar
    Vijay_A_Verma
    Most Valuable Professional

    Your Date column is in Text format not Date format. Select Date column - And choose Data type as Date.

    Then your formula would work

    • MAHSADEPETER's avatar
      MAHSADEPETER
      New Member

      HI, I cannot find the solution, would you please share the link of that page please?