Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Announcements
Save the Date: QlikWorld Online, June 24-25, 2020. Free global virtual event for data integration and data analytic gurus. Register Today
Highlighted
Valued Contributor

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