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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
NickzNickz
Helper IV
Helper IV

Error MdxScritp(Model)(155,63) > Cannot convert value "-" of type Text to type Numeric/Date

Hi .. 

I have below testing measures and can view the result...

Migration (RM) = 
VAR _Result = 
    CALCULATE(
        SUM( fin_migration[Migration (M)] ),
        fin_migration[Date] = MAX( fin_migration[Date] ),
        fin_migration[Month] = MAX( fin_migration[Month] )
    )

RETURN
IF(ISBLANK(_Result),"0.00",_Result)

 

However, when I try to change from "0.00" to "-" , I received  an error as below:

 

MdxScritp(Model)(155,63) > Cannot convert value "-" of type Text to type Numeric/Date

 

What should I do next to resolve the problem? ...

Regards,

NickzNickz

 

2 REPLIES 2
johnt75
Super User
Super User

A measure can only return values of a single type, so everything will need to be numeric or everything will need to be text. If you want to return the values as text you could use the FORMAT function, otherwise you'll need to keep the measure returning blank or 0 when the result is blank.

Hi @johnt75 ,

 

Both my measure and tables are in decimal numbers.

Other tables were just okay... No problem. ..

 

Regards,

NickzNickz

 

 

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

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