10 Replies Latest reply: Mar 26, 2012 3:28 PM by Sebastian Pereira RSS

    chart problem with dimension and expression

      hi everyone,

             i have a problem with an expression like this in a chart:

       

      total = DEALS.commission_percentage * sum(DEALS.discounted_price*DEAL_EXTERNALS.quantity)

       

      the expression need to have a dimension deal.deal_id to calculate the "total", without the dimension deal.deal_id the "total" values are NULL (see attached files).

       

      I don't know what can i do. I tried to resolve the problem using concatenate, join functions but nothing could help me.

       

      DEAL_EXTERNALS:

      LOAD

          Year(created) & Num(Month(created),'00') & Num(Day(created),'00') as %Key_CREATED_DEAL_EXTERNALS,

          deal_id as %Key_DEAL_ID,   

            deal_id,

            quantity

         FROM [..\QVD\DEAL_EXTERNALS.QVD] (qvd);

       

      DEALS:

      LOAD

          Year(start_date) & Num(Month(start_date),'00') & Num(Day(start_date),'00') as %Key_GENERACION_DEALS,

            id AS %Key_DEAL_ID,   

            discount_percentage,

           id as deal_id,

          discounted_price

         FROM [..\QVD\DEALS.QVD] (qvd);

       

       

      thanks for any advice

      Gerardo