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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
Avermaak
Helper I
Helper I

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

3 REPLIES 3
Avermaak
Helper I
Helper I

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

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

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Kudoed Authors