New to QlikView

Discussion board where members can get started with QlikView.

Announcements
Attend QlikWorld 2020 and hear keynote speaker, Malcolm Gladwell. Register by February 29th to save \$200. Learn More
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)

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))

Neves
1 Solution

Accepted Solutions
Highlighted
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.