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

July 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more

Reply
Anonymous
Not applicable

Problem adding a new column

I am having a problem adding a new column to a table 
If I add a new column and use some trivial formula for it (For example NewColumn = 7) it works.
When I try to use the code I need, PBI desktop seem to reject the code and the formula remains blank. However, the code seems to be OK, because if a modify an existing column using this same code, it is accepted and the results are OK.

Any ideas?

Thank you!

3 REPLIES 3
Anonymous
Not applicable

Hi @Anonymous 

 

In order to help you better if your problem is not solved yet, I need to know what is your data connection mode? If it is direct query mode, it will have some limitations, For more details, you can read related document link: 

https://learn.microsoft.com/en-us/power-bi/connect-data/desktop-directquery-about#modeling-limitatio... 

 

Best Regards,
Yulia Xu

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Anonymous
Not applicable

 Hi @Idrissshatila

Not sure what can I share to show you what is happening. Are you asking for uploading the Power BI data model? Don't see how this can be done.

The calculated column I try to add to my model is quite simple. It is just a SWITCH function involving another column and a measure. It works if I replace the code in an existing column but doesn't work if try to use in a new column. 

Thank you for the help. 

Idrissshatila
Super User
Super User

Hello @Anonymous ,

 

can you share with us your code with a sample data or a screenshot so we could see why this is happening to you.



Did I answer your question? Mark my post as a solution! Appreciate your Kudos
Follow me on LinkedIn linkedIn
Vote for my Community Mobile App Idea

Proud to be a Super User!




Helpful resources

Announcements
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

60 days of Data Days Carousel

Data Days 2026

Join Fabric Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.