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

Get inspired! Check out the entries from the Power BI DataViz World Championships preliminary rounds and give kudos to your favorites. View the vizzies.

Reply
m_pat
New Member

Error when adding Conditional Columns - We cannot convert the value null to type Logical.

I am dealing with a client's contact list excel file from Marketo, and have appended additional contacts to the file in the same format as the client's list - I did this in the original Excel. In query editor I am trying to add conditional columns based on campaign names - "If Campaign Name=X, Campaign Description = Y." The Campaign Name in the new records I appended to the excel file are identical to the ones that were already in the client's file. But in the rows containing my additional contacts, I am getting this error in the new conditional column field: 

 

Expression.Error: We cannot convert the value null to type Logical.
Details:
Value=
Type=Type

 

PBIDesktop_2019-07-16_14-22-49.png

 

What is causing this error and how can I resolve it? 

2 REPLIES 2
v-juanli-msft
Community Support
Community Support

Hi @m_pat 

How did you add the conditional column?

Please refer to the blog how to add a conditional column.

https://www.sumproduct.com/blog/article/power-query-blogs/power-query-in-terms-of-conditional-column...

 

If you write code in Advanced editor, please share it and tell me your final needs.

 

Best Regards
Maggie

 

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

kcantor
Community Champion
Community Champion

@m_pat 

Can you share some sample data or the query where the error appears?

Also, try deleting the change type and creating the calculated column prior to assigning types within the query. 





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

FebPBI_Carousel

Power BI Monthly Update - February 2025

Check out the February 2025 Power BI update to learn about new features.

March2025 Carousel

Fabric Community Update - March 2025

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

Top Solution Authors