cancel
Showing results for 
Search instead for 
Did you mean: 

Error in query editor when extracting part of string and converting to number in same step

Hi,

 

The following query generates strange behavior both in the latest version of PBI desktop and in excel:

 

let
Source = #table({"FaseID"}, {{"0. N/A"}, {"1. Ide"}, {"2. Valg av løsning"}, {"3. Utvikling"}, {"4. Utrulling"}, {"5. Avsluttet"}}),
#"Inserted Text After Delimiter" = Table.AddColumn(Source, "Fase", each Text.AfterDelimiter([FaseID], " "), type text),
#"Inserted Text Before Delimiter" = Table.AddColumn(#"Inserted Text After Delimiter", "Sortering", each Text.BeforeDelimiter([FaseID], "."), Int64.Type)
in
#"Inserted Text Before Delimiter"

 

When the query is loaded I get an error message, but when I try to view errors, none are found.

image.png

If the datatype is changed in a seperate step, it works as expected.

Status: New
Comments
Moderator

Hi @TomasTorp

 

The same issue has been reported before internally: CRI 99463806. Please see my last response in this same thread: https://community.powerbi.com/t5/Issues/Table-AddColumn-type-mismatch-should-throw-error-or-warning/...

 

Best Regards,
Qiuyun Yu