Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
Sign up nowGet Fabric certified for FREE! Don't miss your chance! Learn more
Hi folks, I'm trying to create an in-body function, can anyone help? I can create a calable external function... but in this case I would prefer to create an in-body one.
This is the code for the table
let
Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WMlaK1YlWMgKThkqxsQA=", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [Column1 = _t]),
CallRecursive = Table.AddColumn
(
Source,
"Recursive",
each (Recursive) => Table.SelectRows(Source, each if [Column1] = 0 then 1 else [Column1] * @Recursive([Column1] - 1))
)
in
CallRecursive
Solved! Go to Solution.
I didn't know how to close this issue, I was able to find what I was looking for:
let
Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WMlaK1YlWMgKThkqxsQA=", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [Column1 = _t]),
#"Changed Type" = Table.TransformColumnTypes(Source,{{"Column1", type number}}),
//----------------------
Factorial = (num) => if num = 0 then 1 else num * @Factorial (num-1) ,
//----------------------
#"Added Custom" = Table.AddColumn(#"Changed Type", "Factorial", each Factorial([Column1]))
in
#"Added Custom"
ok, what is your question?
I didn't know how to close this issue, I was able to find what I was looking for:
let
Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WMlaK1YlWMgKThkqxsQA=", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [Column1 = _t]),
#"Changed Type" = Table.TransformColumnTypes(Source,{{"Column1", type number}}),
//----------------------
Factorial = (num) => if num = 0 then 1 else num * @Factorial (num-1) ,
//----------------------
#"Added Custom" = Table.AddColumn(#"Changed Type", "Factorial", each Factorial([Column1]))
in
#"Added Custom"
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
| User | Count |
|---|---|
| 63 | |
| 62 | |
| 42 | |
| 19 | |
| 16 |
| User | Count |
|---|---|
| 113 | |
| 105 | |
| 36 | |
| 28 | |
| 28 |