Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

The value expression is diferent if i select thre months or one month

I have this expresion in a Line Graph

(Sum( {$<[Nombre Clasificacion Producto] = {'Platos Principales'},[Codigo Centro de Costo]={"=Sum({$<Año = {$(#=Only(Año)-1)},Mes={$(=$(vMesSeleccionado))}>}[Valor Bruto])"} 

>} [Cantidad Vendida] )

-

Sum({$<[Nombre Linea Producto] ={'Entradas'},[Codigo Centro de Costo]={"=Sum({$<Año = {$(#=Only(Año)-1)},Mes={$(=$(vMesSeleccionado))}>}[Valor Bruto])"},

       [Nombre Clasificacion Producto] = {'Platos Principales'} 

>}

If(Match([Nombre Unidad de Negocio],'Cadena Gourmet')>0,[Cantidad Vendida] ))

-

Sum({$<[Nombre Linea Producto] ={'Sopas'},[Codigo Centro de Costo]={"=Sum({$<Año = {$(#=Only(Año)-1)},Mes={$(=$(vMesSeleccionado))}>}[Valor Bruto])"},

       [Nombre Clasificacion Producto] = {'Platos Principales'} 

>}If(Match([Nombre Unidad de Negocio],'Cadena Gourmet')>0,[Cantidad Vendida] ))

-

Sum({$<[Nombre Linea Producto] ={'Complementos En Platos Principales'},[Codigo Centro de Costo]={"=Sum({$<Año = {$(#=Only(Año)-1)},Mes={$(=$(vMesSeleccionado))}>}[Valor Bruto])"},

       [Nombre Clasificacion Producto] = {'Platos Principales'} 

>}

If(Match([Nombre Unidad de Negocio],'Tradicional')>0,[Cantidad Vendida] ))

-

Sum({$<[Nombre Linea Producto] ={'Salsas Para Platos Pricipales'},[Codigo Centro de Costo]={"=Sum({$<Año = {$(#=Only(Año)-1)},Mes={$(=$(vMesSeleccionado))}>}[Valor Bruto])"},

       [Nombre Clasificacion Producto] = {'Platos Principales'} 

>}If(Match([Nombre Unidad de Negocio],'Tradicional')>0,[Cantidad Vendida] )))

/

Count({$<[Codigo Centro de Costo]={"=Sum({$<Año = {$(#=Only(Año)-1)},Mes={$(=$(vMesSeleccionado))}>}[Valor Bruto])"},[Nombre Centro de Costo]= {'*'}-{'Eventos*'},[Valor Bruto]={'*'}-{'0'}>}[Codigo Centro de Costo])

The Dimension is Mes, when i select just one month the result is correct example

Just Ene selected the result is $6.783 if is Just Selected Feb  the result is $5.423 and If is just selected Mar the result is $6.151

But if i selected the three months the result is

Ene $6.790

Feb $5.446

Mar $6.151

The problem is that the expresion in the part of [Codigo Centro de Costo]={"=Sum({$<Año = {$(#=Only(Año)-1)},Mes={$(=$(vMesSeleccionado))}>}[Valor Bruto])"} include [Codigo Centro de Costo] in  the thre months if exist in someone month of three

0 Replies