Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
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
Master III
Master III

Why donmt you p[ost a sample if possible,

Not applicable
Author

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
Master II
Master II

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