Forum Discussion

krisplikj's avatar
krisplikj
Copper Contributor
Dec 20, 2022
Solved

Formula to calculate streak at the beginning of an array

Hello, I am stumped.  I can calculate the current streak by using lookup or index / match.  These use backwards looking logic.  But what is the function that uses forward looking logic?  I am specif...
  • PeterBartholomew1's avatar
    Dec 20, 2022

    krisplikj 

    Since I think I have a reasonably simple solution, it probably means I have failed to understand the problem!

    = XMATCH(TRUE, sales>0) - 1
    
    or, for the original problem,
    
    = XMATCH(TRUE, results<>TAKE(results,1)) - 1

Resources