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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
kishoresakamuri
Frequent Visitor

creating the expressions in power bi

Hi,

 

Can any one help me on this issue i am creating a column to write the expression. i am getting the below 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.

 

Below is my expression

If(glidepath[Test_Pack]=0,VALUE(glidepath[R_Sprint_name] & " " & glidepath[test_cycle_type]),glidepath[Test_Pack])

 

5 REPLIES 5
v-qiuyu-msft
Community Support
Community Support

Hi @kishoresakamuri,

 

It seems that [Test_Pack], [R_Sprint_name], and [test_cycle_type] are Text data type. If that is a case, you need to modify the expression like below:

 

If(VALUE(glidepath[Test_Pack])=0, glidepath[R_Sprint_name] & " " & glidepath[test_cycle_type]),glidepath[Test_Pack])

 

Reference:
VALUE Function (DAX)

 

Best Regards,
Qiuyun Yu

Community Support Team _ Qiuyun Yu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

HI

 

I am getting the below error when i add value function. Below is the error details.

Error Message:

The following exception occurred while the managed IDataReader interface was being used: Error converting data type varchar to float..

Stack Trace:

 

Invocation Stack Trace:

 

Activity ID
7889a925-043c-42eb-9af8-582d3cee423e

Time
Mon Jan 02 2017 11:51:10 GMT+0530 (India Standard Time)

Version
2.37.4464.602 (PBIDesktop)

Error Code
rsDataShapeProcessingError

OData Error Message
Failed to execute the query.

Hi @kishoresakamuri,

 

Please try to use this expression:

 

If(glidepath[Test_Pack]=BLANK(), glidepath[R_Sprint_name] & " " & glidepath[test_cycle_type],glidepath[Test_Pack])

 

If issue persists, please share some sample for our analysis.

 

Best Regards,
Qiuyun Yu

Community Support Team _ Qiuyun Yu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
kishoresakamuri
Frequent Visitor

Hi Harsha, data types of the fields are same.
Harsha0606
Frequent Visitor

@kishore,

 

check the data type of the fileds that ur using in the formula, I think your comparing text value with the integer.

If you want to compare text values with the interger, you need to use type conversion functions.

 

Thanks,

Harsha.

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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