5 Replies Latest reply on Oct 2, 2018 11:21 PM by Deepak Rai

    Wrong sum

    Jure Kocbek

      Hello,

       

      I have datasource with 3 diffrent custom sql queries. They are left joined by each other on some fields. Because of the join I get multiplied data for example:

       

      Date (field in all 3 queries)
      Sales (query 1 )
      Prediction (query 2)
      Plan(query 3)
      1.1.2018

      10.000

      9.5009.100
      1.1.201810.0009.5009.100

       

      I need seperated sum of sales, prediction and plan for date 1.1.2018.

       

      i tried with 'fixed' function

       

      {

          FIXED  [Date]   :

          SUM(IF  ISNULL([Sales]) THEN

              0

          ELSE

              [Sales]

          END)

      }

       

      but I get result '20.000' just like with formula (sum([Sales])), but all I need is '10.000' for sales, '9.500' for prediction and '9.100' for Plan.

       

      Thanks for help and best regards