Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
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?
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
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.
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?
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.