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

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

Reply
AspireCraig
New Member

Replacing an Integer value with Text using a DAX Formula

Hello everyone,

I am struggling with what seems like a simple task. I am new to Power Bi and using a directy query, my vaules are 1,2,3,4,5, etc. in a field called Types and I want to repalce the Ids with a friendly name, 1= Marketing, 2=PSA, etc. 

I Created a new colum and called it pNames. I have tried using the IF function with something like 

=IF(Query1[TYPES]="1", "MARKETING") on my pType field I receive "Model object names must be non-empty"


What function and syntax would I use for this?

2 REPLIES 2
Anonymous
Not applicable

Hi @AspireCraig ,

 

I tried working on your example but it works for me without any problem.

your IF formula is also correct. Dont know why you are getting this error. ( May be try to chnage the datatype because you replace)

 

or else you can try this 

In Query editor, you can select the column Types and right click-> replace values.

 

Just make sure your changing the datatype to text. ( since you are replacinmg the numerical values with a text values)

 

 

Also take a look at this post with similar error:

 

https://community.powerbi.com/t5/Desktop/Model-object-names-must-be-non-empty-error-message/td-p/460...

 

https://community.powerbi.com/t5/Desktop/quot-Model-Object-names-must-be-non-empty-quot-error-on-all...

 

Thanks,

Tejaswi

Hi @Tejaswi
Changing the type to text would be too easy, it appears this cannot be done when using a direct query importing will not work as this is live data.  From what I can tell all the records have a value set on them. There are no empty or null values on the 'Types' field.
Anything else to try?

Helpful resources

Announcements
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