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!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
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?
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:
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?
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 37 | |
| 36 | |
| 33 | |
| 31 | |
| 29 |
| User | Count |
|---|---|
| 132 | |
| 86 | |
| 85 | |
| 68 | |
| 64 |