Qlik Community

QlikView Creating Analytics

Discussion Board for collaboration related to Creating Analytics for QlikView.

Highlighted
Not applicable

Problem with formula and time variables

Hello erverybody,

i have a problem with the following formula:

if

((Abladestelle=Feld 1 and  BIN_ITEM_DETAIL.ACTIVATION_DATE < v24H),

count({<BIN_ITEM_DETAIL.BIN_CATEGORY={"SPERR2"},BIN_ITEM_DETAIL.BIN={"*BMW"} >}ITEM_MASTER.ITEM_NUMBER),

if((Abladestelle=Feld 2 and  BIN_ITEM_DETAIL.ACTIVATION_DATE < v24H),

count({<BIN_ITEM_DETAIL.BIN_CATEGORY={"SPERR2"},BIN_ITEM_DETAIL.BIN={"*HOLD","*NAEL"}>}ITEM_MASTER.ITEM_NUMBER)))

It is a dimension with 2 fields and different criteria,to be issued for each a value of more than 24 hours is.

This I have tried to show a variable v24H

.

Once I second the If-Funktion(if((Abladestelle=Feld 2 and  BIN_ITEM_DETAIL.ACTIVATION_DATE < v24H),) activate I get a null value in my pivot table.

If I disable the second function If I just get a value for Field1.

Please Help

Greetings Sven

3 Replies
sujeetsingh
Honored Contributor III

Re: Problem with formula and time variables

Why donmt you p[ost a sample if possible,

Not applicable

Re: Problem with formula and time variables

use Aggr() function before count.

like

if((Abladestelle=Feld 1 and  BIN_ITEM_DETAIL.ACTIVATION_DATE < v24H),

Aggr(count({<BIN_ITEM_DETAIL.BIN_CATEGORY={"SPERR2"},BIN_ITEM_DETAIL.BIN={"*BMW"} >}ITEM_MASTER.ITEM_NUMBER),dimensionfield),

if((Abladestelle=Feld 2 and  BIN_ITEM_DETAIL.ACTIVATION_DATE < v24H),

Aggr(count({<BIN_ITEM_DETAIL.BIN_CATEGORY={"SPERR2"},BIN_ITEM_DETAIL.BIN={"*HOLD","*NAEL"}>}ITEM_MASTER.ITEM_NUMBER),dimensionfield)))

sushil353
Honored Contributor II

Re: Problem with formula and time variables

hi Sven,

try this:

if ((Abladestelle=Feld 1 and  BIN_ITEM_DETAIL.ACTIVATION_DATE < '$(v24H)'),

count({<BIN_ITEM_DETAIL.BIN_CATEGORY={"SPERR2"},BIN_ITEM_DETAIL.BIN={"*BMW"} >}ITEM_MASTER.ITEM_NUMBER),

if((Abladestelle=Feld 2 and  BIN_ITEM_DETAIL.ACTIVATION_DATE <

'$(v24H)'),

count({<BIN_ITEM_DETAIL.BIN_CATEGORY={"SPERR2"},BIN_ITEM_DETAIL.BIN={"*HOLD","*NAEL"}>}ITEM_MASTER.ITEM_NUMBER)))

if it doesn't work then please post the sample app.

HTH

Sushil