2 Replies Latest reply: Apr 14, 2016 3:42 AM by Daan van den Brand RSS

    Problem with Set Analysis aggr max Date

    Daan van den Brand

      Hi, all

       

      I have a problem with Set Analysis.

      I want to show the sum of [Aantal] when the THT_Datum = the Maximum THT_Datum per PartijNummer per Artikel.

       

      I'm using the following expression;

       

      Sum ({<THT_Datum = {"$(=aggr(nodistinct(max(THT_Datum)),PartijNummer,Artikel))"}>}Aantal)

       

      When I have no selections made it will return only 0 values.

       

      Knipsel1.PNG

      If I make a selection based on one PartijNummer it will return the correct Values:

      Knipsel2.PNG

       

       

      I can solve it with an IF expression but i want to solve it in Set Analysis because I also need the data per Week.

       

      Is there anyone who can help me?

      Thank you very much in advance.

       

      Daan