9 Replies Latest reply: Jun 28, 2018 8:40 AM by Jurien Groot RSS

    Aggr in calculated dimension

    Jurien Groot

      I have an aggr dimension that works:

      aggr(if(rank($(vKPI_Global_Score_YTD))=2,[Customer]),[Customer])

       

      It returns the Customer who has the 2nd highest score for the variable.

       

      Now I want a calculated dimension that should work something like:

       

      IF([Customer] = aggr(if(rank($(vKPI_Global_Score_YTD))=2,[Customer]),[Customer]) AND Zone = 'ABC', [Customer Zone])

       

       

       

      I also tried something like:

      aggr(if(Customer=aggr(if(rank($(vKPI_Global_Score_YTD))=2,[Customer]),[Customer]) and Zone ='ABC', [Customer Zone], [Customer Zone])

       

      This however isn't working for both.

       

      Any Idea?