Forum Discussion
haidong
6 years agoNew Member
DAX comparison operations do not support comparing values of type Text with values of type Integer
I got error message with this fomular : if('GI_Yield Feb20'[Item_N]="no",'GI_Yield Feb20'[Qty in unit of entry]/2,'GI_Yield Feb20'[Qty in unit of entry] I have confirmed the data type of[It...
- 6 years ago
Hi haidong ,
I think there may be spaces in the item_n column.
You can try the DAX below:
Column = IF ( SEARCH ( "no", 'GI_Yield Feb20'[Item_N], 1, 0 ) > 0, 'GI_Yield Feb20'[Qty in unit of entry] / 2, 'GI_Yield Feb20'[Qty in unit of entry] )Best Regards,
Liang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
amitchandak
6 years agoSuper User
Try like this nad check
if('GI_Yield Feb20'[Item_N] & ""="no",'GI_Yield Feb20'[Qty in unit of entry]/2,'GI_Yield Feb20'[Qty in unit of entry]
Make sure data type changed here
AteeqSundhu
2 years agoFrequent Visitor
Hi
i m trying to extract first X digits out of my ID column of data as
Match-ID = IF('ATL-270524'[NTN-FBR] = 9, LEFT('ATL-270524'[NTN-FBR], 7), LEFT('ATL-270524'[NTN-FBR], 11))
but this resulted in error as "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."
basically the field "NTN-FBR" is having digits plus "-" dash in few cases that is why i've kept data type of this field as "TEXT"
kindly guide ASAP.