Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Good afternoon, I have the following formula
IF ( Nombre = 'Cantidad', SUM(AGGR(IF([Linea Cancelada]='X',IF (sum(Cantidad)<=sum(Stock_Nacional-[Stock Total]),sum(Cantidad),sum(Stock_Nacional-[Stock Total])), IF(Sum([Cantidad movida])>0 AND LEN(TRIM([Fecha Movimiento Mercancia]))>0,IF( [Fecha Movimiento Mercancia]<=FECHA,IF(sum(Cantidad)<=sum([Cantidad movida]),sum(Cantidad),sum([Cantidad movida])), IF(SUM(Cantidad)<=sum(Stock_Nacional),sum(Cantidad),Sum(Stock_Nacional))),IF(sum(Cantidad)<=sum(Stock_Nacional),sum(Cantidad),sum(Stock_Nacional)))),Id_Fec_Rep,OT)), SUM(AGGR(IF([Linea Cancelada]='X',IF (sum(Cantidad)<=sum(Stock_Nacional-[Stock Total]),sum(Cantidad)*[Valor unitario],sum(Stock_Nacional-[Stock Total])*[Valor unitario]), IF(Sum([Cantidad movida])>0 AND LEN(TRIM([Fecha Movimiento Mercancia]))>0,IF( [Fecha Movimiento Mercancia]<=FECHA,IF(sum(Cantidad)<=sum([Cantidad movida]),sum(Cantidad)*[Valor unitario],sum([Cantidad movida])*[Valor unitario]), IF(SUM(Cantidad)<=sum(Stock_Nacional),sum(Cantidad)*[Valor unitario],Sum(Stock_Nacional)*[Valor unitario])),IF(sum(Cantidad)<=sum(Stock_Nacional),sum(Cantidad)*[Valor unitario],sum(Stock_Nacional)*[Valor unitario]))),Id_Fec_Rep,OT)) ) |
This formula adds the inventory of all the wineries of the company, I would like that when filtering a winery this value does not change but that it continues to give me the total of all the branches,
For example, all the branches add 564,000 units to me at the time of filtering a winery. I want that amount to continue appearing.
I appreciate your help, thanks
Look at using Set Analysis
Sum(Cantidad) is the same as Sum({$}Cantidad) which obeys selections. You could use Sum({1}Cantidad) which ignores all selections or Sum({<YourDimensionNameHere=>} Cantidad) which would ignore selections on YourDimensionNameHere and obey all other selections.
Thanks¡¡