Forum Discussion

Joseph_Hung's avatar
Joseph_Hung
Copper Contributor
Jul 07, 2021

Can we use match formula in pivot table's calculated fields?

Hello Community,

 

I'm trying to create a calculated field in a pivot table and there is one formula as below.

This formula works fine in my excel sheet, but I can't create one in pivot table as a formula. Is it because of the match, offset or column functions that prevent me from doing so? 

 

=MATCH(O4,SUBTOTAL(9,OFFSET(Y4,,,,COLUMN(Y4:AK4)-COLUMN(Y4)+1)))

 

Thanks a lot.

5 Replies

  • Yea_So's avatar
    Yea_So
    Bronze Contributor
    i am assuming you are using data model and power pivot?
    • Joseph_Hung's avatar
      Joseph_Hung
      Copper Contributor
      Hi Yea_So - No, I'm actually using the basic pivot table. Any ideas why...?
      • Yea_So's avatar
        Yea_So
        Bronze Contributor

        Hi, Joseph_Hung,

         

        A pivot table is used to organize, summarize and aggregate dataset to answer analysis questions.

        so if you have to use a match function, it tells me that either 1. you are using structured tables in a data model to summarize, aggregate your dataset to answer analysis questions.  If you are using match function, then you are still in the dataset prepping stage and should not be creating the pivot table until you are done looking up  values to match all the information from other structured excel defined tables.

Resources