Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Avermaak
Frequent Visitor

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
 
Avermaak_1-1658305125912.png
1 ACCEPTED SOLUTION
Vijay_A_Verma
Super User
Super User

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

Then your formula would work

View solution in original post

2 REPLIES 2
Avermaak
Frequent Visitor

Thank you so much, it worked

 

Vijay_A_Verma
Super User
Super User

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

Then your formula would work

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors
Top Kudoed Authors