Forum Discussion

Aladdin_Ajaj's avatar
Aladdin_Ajaj
Copper Contributor
Mar 29, 2023

Index and filter to mirror data

=INDEX(FILTER(Source_Sheet[[date]:[notes]],(Source_Sheet[currency]="usd")*(Source_Sheet[order]="buy")), , {1,2,3,4,6,7,8,16,17}) I'm using this formula to retrieve data from source sheet but it only extract the first value that meet the criteria I want all data to be retrieved

  • Rodrigo_'s avatar
    Rodrigo_
    Steel Contributor

    Aladdin_Ajaj 

    The formula you provided is using the FILTER function to extract data from the Source_Sheet based on two criteria - currency = "usd" and order = "buy". However, the INDEX function is only returning the first column of the filtered data.

    To retrieve all the columns of the filtered data, you can modify the formula as follows: 

    =FILTER(Source_Sheet[[date]:[notes]],(Source_Sheet[currency]="usd")*(Source_Sheet[order]="buy"))

    This will return a filtered array of data that contains all the columns from the Source_Sheet that meet the currency and order criteria.

    Alternatively, if you want to select specific columns from the filtered data, you can modify the formula as follows: 

    =INDEX(FILTER(Source_Sheet[[date]:[notes]],(Source_Sheet[currency]="usd")*(Source_Sheet[order]="buy")), , {1,2,3,4,6,7,8,16,17})

     Make sure to remove the empty space between the commas inside the curly brackets if you want to retrieve columns 1, 2, 3, 4, 6, 7, 8, 16, and 17 from the filtered data.

    • Aladdin_Ajaj's avatar
      Aladdin_Ajaj
      Copper Contributor
      =FILTER(CHOOSECOLS(Source_Sheet[[date]:[notes]],{1,15,2,3,4,5,6,7,8,16,17}),(Source_Sheet[currency]="usd")*(Source_Sheet[order]="buy")) I modified this formula with the help of the community and I'm able to extract specific column that meet the criteria .

      Now I'm wondering If I can use spill formula inside excel table?
      • Patrick2788's avatar
        Patrick2788
        Silver Contributor
        Tables are scalar-based. Adding FILTER to a table would result in a column of #SPILL! errors

Resources