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

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

Reply
Anonymous
Not applicable

DAX comparison operations do not support comparing values of type True/False with values of type Int

Hello.
 
May anyone help me to sort out "DAX comparison operations do not support comparing values of type True/False with values of type Integer. Consider using the VALUE or FORMAT function to convert one of the values." error?
 
I created the following column to show the current month and the last month on blank:
 
current_last_month_blank = IF(OR(
VALUE(CONCATENATE(YEAR(MAX(Calendario_pedido[Order_day]));
                                       FORMAT(MONTH(MAX(Calendario_pedido[Order_day])); "00")));
VALUE(MAXX( Calendario_pedido;CONCATENATE(YEAR(DATEADD(Calendario_pedido[Order_day];-1;MONTH));
                                       FORMAT(MONTH(DATEADD(Calendario_pedido[Order_day];-1;MONTH));"00")))))
                                            = Calendario_pedido[year_month_order];
                                           BLANK();
                                          Calendario_pedido[year_month_order])
 
 
 
Thanks
1 ACCEPTED SOLUTION
ibarrau
Super User
Super User

Hi there. The thin is you have to ask twice in the OR statement and not at the end. It need from you to return a true false on each argument of the function. Check this correction out:

IF(
	OR(
		VALUE(CONCATENATE(YEAR(MAX(Calendario_pedido[Order_day]));
			FORMAT(MONTH(MAX(Calendario_pedido[Order_day])); "00"))) = Calendario_pedido[year_month_order];
		VALUE(MAXX( Calendario_pedido;CONCATENATE(YEAR(DATEADD(Calendario_pedido[Order_day];-1;MONTH));
			FORMAT(MONTH(DATEADD(Calendario_pedido[Order_day];-1;MONTH));"00"))))= Calendario_pedido[year_month_order]
	)
	; BLANK()
	; Calendario_pedido[year_month_order]
)

There you have two times the condition.

 

Hope this works

Regards


If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Happy to help!

LaDataWeb Blog

View solution in original post

2 REPLIES 2
ibarrau
Super User
Super User

Hi there. The thin is you have to ask twice in the OR statement and not at the end. It need from you to return a true false on each argument of the function. Check this correction out:

IF(
	OR(
		VALUE(CONCATENATE(YEAR(MAX(Calendario_pedido[Order_day]));
			FORMAT(MONTH(MAX(Calendario_pedido[Order_day])); "00"))) = Calendario_pedido[year_month_order];
		VALUE(MAXX( Calendario_pedido;CONCATENATE(YEAR(DATEADD(Calendario_pedido[Order_day];-1;MONTH));
			FORMAT(MONTH(DATEADD(Calendario_pedido[Order_day];-1;MONTH));"00"))))= Calendario_pedido[year_month_order]
	)
	; BLANK()
	; Calendario_pedido[year_month_order]
)

There you have two times the condition.

 

Hope this works

Regards


If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Happy to help!

LaDataWeb Blog

Anonymous
Not applicable

Thanks buddy, you are right!

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 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 Solution Authors
Top Kudoed Authors