Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

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

10 Replies
sebastiandperei
Specialist
Specialist

jeje... todo bien!

Con respecto a los calendarios. Lo más recomendable siempre es tener uno sólo. La idea es hacer una nube de datos que relacione a todas las tablas, para lograr que al seleccionar un valor en un campo, te filtre los demás.

La verdad es que no tengo alguna sugerencia más particular a tu caso, ya que para hacer esto hace falta conocer bien los datos y qué es lo que hay que mostrar, cosa que no pude comprender en lo que pasaste.

Te agregué como amigo, si querés mandame un mensaje así no ensuciamos el post.

Saludos!!