Forum Discussion

James_Buist's avatar
James_Buist
Brass Contributor
Nov 03, 2024
Solved

Dynamic Arrays - Extend the last logical row value in a 2D array

One more for experts. Again, with my new found knowledge I still was not quite able to make this work.   Simple balance sheet values that I need to extend into the forecasts as is. i.e. the last ac...
  • James_Buist's avatar
    James_Buist
    Nov 04, 2024

    As always a fabulous solution - actually 2. I'm using the Index as it is actually so fundamentally simple. Not sure why I couldn't get there but added more to my war chest. I now fully get the sequence inside the index to force the rows. And, of course, xmatch in reverse!! Why did I not think of that!!
    ANd the error handling then if flags are missing. Very nice and very reusable.

    I now get the scan & map combo. I see the use of the new enhanced byrow - I will carry on with the older version for a bit longer until all have it rolled out but it took a few seconds to figure out how it worked as never actually just seen it in use!
    So now I fully get it. The map lets you do the logical test with the flag to leave only the last values in the resulting array and then you just do the usual scan function on that using the NAs to reset the rows. That will be a great addition to my library and I can now think of a number of places I could use that kind of combination

    Both fab. I may doa performance test sometime to compare them but the usage is not high so won't make much difference. I have 7 sets of these so far and don't notice anything on the calc speed.

    Many thanks to you again - and Peter for his input.

Resources