5 Replies Latest reply: Jul 31, 2013 1:37 PM by Andrea Rebora RSS

    Expression Count*sum

    Andrea Rebora

      Dear All,


      I changed the source from a file to an ODBC Database.
      Before I had an excel file with the vorious data of the Ticket (TT) on a line and the fields 'Repair Time' and 'expected repair time' in two columns.
      To find the sum of the scheduled hours I had to use the simple expression


      sum ([expected repair time]).


      But now with the new script field 'expected repair time' is in another table.
      I had to change the expression in


      = [expected repair time] * Count (DISTINCT (IdTT)).


      This new expression works in a chart with dimension ProductId
      but the total does not work.
      I tried to modify the expression in


      = sum (Aggr ([expected repair time], [ProductId])) * Count (DISTINCT (IdTT))


      but I always have the same problem with the total.

      I also tried to enter the expression in a list box with the field 'TypeTTId', but it shows the same total wrong.

      Do you have a suggestion?

      thank you very much


        • Re: Expression Count*sum
          Stefan Wühl

          It's hard to answer your question without knowing your data model.


          Can you describe in more detail how your tables are linked, and in what context you are using your expressions?

          If you could post a small sample file that demonstrate your issue, this would make it even easier to help you.




            • Re: Expression Count*sum
              Andrea Rebora

              Hi Stefan, many thanks for your answer.

              I attach for your perusal the tables's map.

              Maybe the solution is to concatenate the field [expected repair time] to the table TabChiamate, to build the same table that I had before.

              Otherwise I know that you are a Master and you will find the correct answer!