Named Lambda Function doesn't work inside another

JackDanIce

Well-known Member
Joined
Feb 3, 2010
Messages
9,922
Office Version
  1. 365
Platform
  1. Windows
Hi,

I have this LAMBDA function "Flag_Sum" which works fine at spreadsheet level:
Power Query:
=LAMBDA(calc, flag, lag, LET(
    flaglag, flag + lag,
    padding, SEQUENCE(flaglag, , 0, 0),
    sum_calc, DROP(MAP(calc, LAMBDA(flaglag, SUM(OFFSET(flaglag, , , flag)))), -flaglag),
    VSTACK(padding, sum_calc)
))
I am trying to call it function "Full_Build":
Power Query:
=LAMBDA(date, prices, captive, custom, lag, flag1, LET(
    price_change, Price_Change(prices),
    s, captive - custom,
    a, Flag_Sum(s, flag1, lag),
    k, HSTACK(date, price_change, s, a),
    k
))
As far as I can break down, SUM(OFFSET(flaglag, , , flag)) in "Flag_Sum" is giving an output that isn't an array to fit step "a" in "Full_Build", but called alone, "Flag_Sum" correctly spills at spreadsheet level.

Can anyone else what the issue is?

TIA,
Jack
 

Excel Facts

Format cells as time
Select range and press Ctrl+Shift+2 to format cells as time. (Shift 2 is the @ sign).

Forum statistics

Threads
1,216,095
Messages
6,128,795
Members
449,468
Latest member
AGreen17

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top