3 Replies Latest reply on Dec 27, 2018 12:35 AM by Deepak Rai

    Finding minimum sales

    Gavin Wong

      Hi community,

       

      I am trying to return the minimum sales across the 4 years. ie south should return $71,360, central should return $102,874 etc..

       

      the LOD works as expected returning all 4 values of $71,360, $102,874 etc..

      {FIXED [Region]:MIN(

      {FIXED DATETRUNC('year', [Order Date]),[Region] :

      SUM([Sales])}

       

      but when i inserted

       

      IF [Sales] =

      {FIXED [Region]:MIN(

      {FIXED DATETRUNC('year', [Order Date]),[Region] :

      SUM([Sales])}

      )}

      THEN

      [Sales]

      END

      everything goes blank.

      the expected result should be showing just 1 minimum sale at the correct year.

      what have i done wrong ?