Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago

Return First Date Based on Criteria

I'm looking to find the first date where the value of a style drops below 6,000.

 

Current formula is Stockout Day = Calcualte(Min(Calendar{Date}), Filter (In Stock Data , [Running] < 6000))

 

Running is a cumulative total that decreases each day. The current formula just returns the current day inside the table.

 

I was unable to paste an image here, but any help would be amazing!

 

Thank you,

 

 

2 Replies

  • az38's avatar
    az38
    Icon for Community Champion rankCommunity Champion

    Hi Anonymous 

    filter without ALL() works in row-context

    try

     

    Current formula is Stockout Day = Calcualte(Min(Calendar[Date]), Filter (ALL(In Stock Data) , [Running] < 6000))

     

    do not hesitate to give a kudo to useful posts and mark solutions as solution

     

     

    • hafizsultan's avatar
      hafizsultan
      New Member

      Please use below, it should give you the required result.

       

      Current formula is Stockout Day = Calcualte(Min(Calendar{Date}), Filter ALL((In Stock Data[Running]) , [Running] < 6000))