Home > Mobile >  Multiply values return in invoked function Power BI
Multiply values return in invoked function Power BI

Time:09-29

Is it possible to return for example 2 lists using invoked function? enter image description here

I cannot find a answer is that even possible.

This is my input table enter image description here

And for example I want to function return column OrderID and OrderID 1

enter image description here

CodePudding user response:

You output shows that what you want for output is not two lists; rather it is a two-column table.

Here is one way to do that:

(L as list, A as number) =>

let 
    M = List.Transform(L, each _   A),
    T = Table.FromColumns({L,M},{"OrderID","OrderID2"})
in 
    T

Here is the code from the invoked function:

let
    Source = fnAdd(Table[OrderID], 1)
in
    Source

where Table[OrderID] is the OrderID column of your input table

first two columns of data input table
enter image description here

output from invoked function
enter image description here

  • Related