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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Anonymous
Not applicable

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

Hi everyone,
I am sure we've all seen this error before.
My example however, simply doesn't make sense.

 

I have a simple if lengthy Conditional Column.


I am compiling a "friendly" Customer name from a number of columns in an appended query. 

I have appended four queries that have different descriptors for our customers.

So in some case I refer to a "Customer" field some to a "Client name field" and others to a code field.

From this I want one, definitive list of customer names

e.g.

Customer   Client Name   Code      Customer Name (Conditional Column).

ACME                                               ACME

                  ACME Inc                       ACME

                                         Acm002  ACME

(But of course with more than one customer!)                            

There are about 40 rows in the Conditional Column dialogue box...but I haven't read anywhere that there is a limit to this.

In any case, I start getting the error for some rows:
Expression.Error: We cannot convert the value null to type Logical.
Details:
Value=
Type=[Type]

But not for all examples of that particular field, so sometimes ACME as “Customer” will work, sometimes it gives the error, and sometimes returns "null" all for the one customer!

 

In the appended query the Customer   Client Name   Code fileds are either populated, or null, as you woudl expect. 

I can't simply say "If Code = null then "null" as I lose that row when it will be matched by another column.

Note that I can't do numerous Conditional Columns in the source queries as Code and Client Name are from the same query (Oh joy)

 

Any help here?

3 REPLIES 3
Jimmy801
Community Champion
Community Champion

Hello @Anonymous 

 

question... why you don't rename these columns prior of combining them?

And afterwards use a 2nd table to join the friendly name to it?

 

Jimmy

 

Anonymous
Not applicable

Becuase which column contains the information I need to determine the Customer Name varies, I can't just stack them in one query.

What I did in the end was build the Conditional Column in each of the smaller queries before apending.

That worked fine, even thoguh some of the these CC's were preteyy complex and lengthy I dind't have any problems

I still am not sure why I was getting that error though.

Anonymous
Not applicable

UPDATE to my own question.

 

Seems when I only use one column to form the conditional column, I get correct entries or null.
So maybe I have to break this all up into conditional columns that each refer to only one source column?

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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 Solution Authors