Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Announcements
Read about Qlik’s Response to COVID-19 Read the Letter, Join the Group.
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
1 Solution

Accepted Solutions
Highlighted
Digital Support
Digital Support

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

Hello there,


I attached the file back for you.
I created a variable named Var and used it on your expressions.
Please let us know if it works for you.

To help users find verified answers, please don't forget to mark a correct resolution or answer to your problem or question as correct.

View solution in original post

1 Reply
Highlighted
Digital Support
Digital Support

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

Hello there,


I attached the file back for you.
I created a variable named Var and used it on your expressions.
Please let us know if it works for you.

To help users find verified answers, please don't forget to mark a correct resolution or answer to your problem or question as correct.

View solution in original post