Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
I have the below custom column in the query editor, where the source is a table with text data and then 2 columns are created upon this.
I need to change the source to the table 'rel' and the column 'Score'. No matter what youtube tutorials or format changes i try i keep getting errors.
Would some one be able to help amend the syntax to use the source table and column above where applicable?
let
Source = #table(
{"Column1"},
List.Zip(
{{
"Call me on 08588812885",
"Call me on 07525812845",
"I need assitance please call me",
"Last tried in 2019"
}}
)
),
#"Added Custom" = Table.AddColumn(Source, "Custom", each Text.Split([Column1], " ")),
#"Added Custom1" = Table.AddColumn(
#"Added Custom",
"Custom.1",
each Text.Combine(
List.Select(
[Custom],
(l) => [
ListOfCharacters = Text.ToList(l),
Result = not (List.Count(ListOfCharacters) >= 10
and List.AllTrue(
List.Transform(ListOfCharacters, (x) => List.Contains({"0".."9"}, x))
)
)][Result]
), " ")
)
in
#"Added Custom1"
Hello @ryanb11
so basically you only need to change the code to a new source`?
Then try this
let
Source = rel,
#"Added Custom" = Table.AddColumn(Source, "Custom", each Text.Split([Score], " ")),
#"Added Custom1" = Table.AddColumn(
#"Added Custom",
"Custom.1",
each Text.Combine(
List.Select(
[Score],
(l) => [
ListOfCharacters = Text.ToList(l),
Result = not (List.Count(ListOfCharacters) >= 10
and List.AllTrue(
List.Transform(ListOfCharacters, (x) => List.Contains({"0".."9"}, x))
)
)][Result]
), " ")
)
in
#"Added Custom1"
If this post helps or solves your problem, please mark it as solution (to help other users find useful content and to acknowledge the work of users that helped you)
Kudoes are nice too
Have fun
Jimmy
i Jimmy, I need to create a new column to an existing table already loaded into Power BI. I dont want to create a table with the amended text values either, would you be able to help with the code to create a new column in the existing 'rel' table. @Jimmy801
hello @ryanb11
I cannot follow you. You can use the GUI and choose Add Column --> Custom Column. Insert the text or the formula you want and thats it. In case you don't want to touch your original table, right click on your query/table and select "Reference".
If this post helps or solves your problem, please mark it as solution (to help other users find useful content and to acknowledge the work of users that helped you)
Kudoes are nice too
Have fun
Jimmy
There's no real need for List.Zip.
Create the table like so:
let
Source = #table(
{"Column1"},
{{"Call me on 08588812885"},
{"Call me on 07525812845"},
{"I need assitance please call me"},
{"Last tried in 2019"}
}
),
Which also shows you how to replace this with your desired source.
let
Source = #table(
{"Score"},
{rel[Score]}
),
But this still looks weird. Why not use
Let Source = Table.FromList(rel[Score], Splitter.SplitByNothing(), null, null, ExtraValues.Error)
?
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
15 | |
12 | |
8 | |
8 | |
7 |
User | Count |
---|---|
15 | |
13 | |
9 | |
7 | |
6 |