Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Ribeiro
Specialist
Specialist

If subsidiary stock is negative or zero, bring the current stock position of another branch.

If the Stock of Branch 1 is 0 or <0. Bring the Stock Balance of Branch 3 (Column 2) and Branch 5 (Column 3)

 

LOAD
Qtde_Estoque_Atual,
if(num([Qtde_Estoque_Atual]) <=0,0,1) as Estoque_Sim1,
if(num([Qtde_Estoque_Atual]) =0,0,1) as Estoque_Sim2,
NomeProdutoE,
CodigoProduto,
Data_Alteracao,
CodigoFilialE,
DiaE,
TrimestreE,
AnoE,
MesE


FROM
[C:\manaus\Estoque.qvd]
(qvd);

Est:1

Sum({$<AnoE ={$(=Year(today()))},MesE={$(=Month(today()))},DiaE={$(=Day(today()))},[CodigoFilialE]={'1'},[Estoque_Sim1]={'0'} >}Qtde_Estoque_Atual)

Est:2

if(Sum({$<AnoE ={$(=Year(today()))},MesE={$(=Month(today()))},DiaE={$(=Day(today()))},[CodigoFilialE]={'1'},[Estoque_Sim1]={'0'} >}Qtde_Estoque_Atual),
Sum({$<[CodigoFilialE]={'3'} ,[Estoque_Sim1]-={'0'} >}Qtde_Estoque_Atual))

 

2019-03-15_10-54-01.png

Neves
0 Replies