cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Yxalitis
Frequent Visitor

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
Yxalitis
Frequent Visitor

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

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?

Super User I
Super User I

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

Hello @Yxalitis 

 

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

 

Yxalitis
Frequent Visitor

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

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.

Helpful resources

Announcements
New Ranks Launched March 24th!

New Ranks Launched March 24th!

The time has come: We are finally able to share more details on the brand-new ranks coming to the Power BI Community!

‘Better Together’ Contest Finalists Announced!

‘Better Together’ Contest Finalists Announced!

Congrats to the finalists of our ‘Better Together’-themed T-shirt design contest! Click for the top entries.

Arun 'Triple A' Event Video, Q&A, and Slides

Arun 'Triple A' Event Video, Q&A, and Slides

Missed the Arun 'Triple A' event or want to revisit it? We've got you covered! Check out the video, Q&A, and slides now.

Join THE global Microsoft Power Platform event series.

Join THE global Power Platform event series.

Attend for two days of expert-led learning and innovation on topics like AI and Analytics, powered by Dynamic Communities.

Community Summit North America

Community Summit North America

Innovate, Collaborate, Grow. The top training and networking event across the globe for Microsoft Business Applications

Top Solution Authors
Top Kudoed Authors