Forum Discussion

arisblan's avatar
arisblan
Copper Contributor
Feb 20, 2025
Solved

Dynamic Array filter multiple values

Is there a method to use the FILTER formula for filtering "table 1" based on values of table 2

thanks for helping

 

 

 

11 Replies

  • Just to have choice

    = REDUCE(Table1[#Headers],Table2, 
          LAMBDA(acc,criterion, 
              VSTACK(acc, FILTER(Table1, Table1[Year]=criterion))
          )
      )

    This performs repeated filter steps and stacks the results.

    • SergeiBaklan's avatar
      SergeiBaklan
      Diamond Contributor

      PeterBartholomew1 , IMHO, that's overcomplicated. You iterate criteria and stack them into result with high-level functions. Calc engine in any of xxIFS function combines criteria on boolean AND applying filter to source data. My guess calc engine shall do that more efficiency.

  • SergeiBaklan's avatar
    SergeiBaklan
    Diamond Contributor

    One more

    =FILTER( Table1, COUNTIF(Table2[Filter], Table1[Year]), "no data" )
    • arisblan's avatar
      arisblan
      Copper Contributor

      I've been struggling with this problem...everything looks so simple when somebody tells you the solution. Thanks to everyone for helping me!

    • arisblan's avatar
      arisblan
      Copper Contributor

      thank you so much for your help!

    • arisblan's avatar
      arisblan
      Copper Contributor

      I've been struggling with this problem...everything looks so simple when somebody tells you the solution. Thanks to everyone for helping me!

    • arisblan's avatar
      arisblan
      Copper Contributor

      everything works!! thank you so much

Resources