6 Replies Latest reply: Jul 10, 2012 11:28 AM by user5674 RSS

    pivot table: aggregated count dependending of If(date=max(date)) condition

      Hello,

       

      I have this sort of values:

      CountryRegionCityIDDate

      Product

      Client

      C1R1C1105/10/2011P1C1
      C2R2C2102/10/2011P4C4
      C3R3C3305/02/2011P6C3
      C4R4C4410/02/2011P7C2

       

      I want to have in a pivot table with dimension Country,Region,City this value:

      Aggr(

           Count( distinct

                     If( Date=Max(Date) and Product=P2 and ..., ID)

           )

           ,Country,Region,Status,ID

      )

       

      this sort of expression only give me "0" or "-".

       

      I guess the condition Date=Max(Date) don't work. I want only count the ID if it has reach is maximum date on one or more data lines which validate also the other "IF" condition, aggregated by the dimensions of the pivot table.

       

      I can't send you my application.

       

      Could you help me?