Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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