10 Replies Latest reply: Nov 13, 2012 4:51 AM by Jean-Philippe Gembert RSS

    Bulding a Pivot Table with an expression that satisfy a condition such as 'Column = max(Column)'

    Jean-Philippe Gembert

      Hi,

       

      I've got a table like this :

       

      Project_Id     Scenario_Id          Value

      ----------     ------------         --------------------

      1000           1                    12

      1000           2                    13

      1000           3                    14

      2000           1                    12

      2000           2                    15

       

       

      I woul like to build a pivot table that returns this :

       

      Project_Id (Dimensions)      Value(Expression)

      -----------------------      ------------------------------

      1000                         14

      2000                         15

       

      where Value(Expression) = sum( if( Scenario_Id = Max(Scenario_Id in the contexte of the dimension Projetc_Id), Value ) )

       

      But It does not work.

       

      I tried to place a calculated dimension like aggr( max(Scenario_Id), Project_Id) a then an expression like sum( Value ) but my expression is not evaluated in the context of this new dimension.

       

      What can I do ?

       

      Is it possible to solve my request in QlikView ?

       

      With many thanks,

      Oomingmak.