Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Next up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now

Reply
DanYuncken
Helper I
Helper I

Why does this function create 'Computed Tables'?

I have a function in a dataflow that when invoked creates a computed table. However, if the same steps a followed without invoking a function, the table is not a computed table. I'm hoping someone can explain why this is the case and hopefully provide a workaround.

 

The function generates a list of numbers from two parameters StartNumber to EndNumber inclusive.

 

ListOfNumbersFunction:

let

  NumberParameters = (StartNumber, EndNumber) =>

let

  Source =  #table(type table [#"Start Number"=Int64.Type, #"End Number"=Int64.Type],{{StartNumber,EndNumber}}),

  #"Added List Length" = Table.AddColumn(Source, "List Length", each [End Number]-[Start Number]+1, Int64.Type),

  #"Added Number List" = Table.AddColumn(#"Added List Length", "Number List", each List.Numbers([Start Number], [List Length], 1), type list),

  #"Expanded Number List" = Table.ExpandListColumn(#"Added Number List", "Number List"),

  #"Changed column type" = Table.TransformColumnTypes(#"Expanded Number List", {{"Number List", Int64.Type}}),

  #"Removed other columns" = Table.SelectColumns(#"Changed column type", {"Number List"})

in

  #"Removed other columns"

 

in

  NumberParameters

 

Invoked function:

let

  Source = ListOfNumbersFunction(5, 60)

in

  Source

 

The invoked function returns a ‘calculated table’ with a list of numbers starting at 5 and ending with 60

 

However, this code returns a normal table:

let

  Source =  #table(type table [#"Start Number"=Int64.Type, #"End Number"=Int64.Type],{{5,60}}),

  #"Added List Length" = Table.AddColumn(Source, "List Length", each [End Number]-[Start Number]+1, Int64.Type),

  #"Added Number List" = Table.AddColumn(#"Added List Length", "Number List", each List.Numbers([Start Number], [List Length], 1), type list),

  #"Expanded Number List" = Table.ExpandListColumn(#"Added Number List", "Number List"),

  #"Changed column type" = Table.TransformColumnTypes(#"Expanded Number List", {{"Number List", Int64.Type}}),

  #"Removed other columns" = Table.SelectColumns(#"Changed column type", {"Number List"})

in

  #"Removed other columns"

 

I am keen to understand why calling the function makes the output table a computed table.

 

Thanks in advance

Dan

1 ACCEPTED SOLUTION
DanYuncken
Helper I
Helper I

I was able to resolve this by saving the dataflow and then re-editing it again. No idea of the original cause.

View solution in original post

1 REPLY 1
DanYuncken
Helper I
Helper I

I was able to resolve this by saving the dataflow and then re-editing it again. No idea of the original cause.

Helpful resources

Announcements
April Power BI Update Carousel

Power BI Monthly Update - April 2026

Check out the April 2026 Power BI update to learn about new features.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

FabCon and SQLCon Highlights Carousel

FabCon &SQLCon Highlights

Experience the highlights from FabCon & SQLCon, available live and on-demand starting April 14th.