Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Set expression

 

Fields:

REC_DAT             Received Date

WERKS                  Plant

MATNR                Material Number

INV_QTY              Invoice Quantity – 3PL qty

PCN_DAT            PCN date

GR_DAT               GR Date

Logic

For 3PL stock as on 30.04.2014

REC_DAT <= monthend & GR_DAT = “ ” or > monthend this is the logic that i should calculate for all the monthend value to get the 3pl stock

({<REC_DAT= {"<=$(=MonthEnd(Today()))"}, [GR Date]= {">$(=MonthEnd(Today()))", ''}>}

I tried the above expression but it doesnt work

Labels (1)
12 Replies
tresB
Champion III
Champion III

In such queries attach a sample qvw to get faster solution.

Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

Try something like sum({<REC_DAT= {"<=$(=MonthEnd(Today()))"}, [GR Date]= {">$(=MonthEnd(Today()))"'}>} INV_QTY).

Note, you will have to make sure the date formats of REC_DAT and GR Date match the default date format of your document.


talk is cheap, supply exceeds demand
Not applicable
Author

thats not working and i have tried it before
and date formats is same for all

ali_hijazi
Partner - Master II
Partner - Master II

what is the format of REC_DAT and GR_DAT are they numeric or readable dates?

MonthEnd(Today()) will return a value that is formatted and not numeric

I can walk on water when it freezes
Not applicable
Author

31-04-2014(DD-MM-YYYY) this is the format for all the date fields in the application

Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

Make sure your date fields actually contain data values and not string values that only look like dates.


talk is cheap, supply exceeds demand
ali_hijazi
Partner - Master II
Partner - Master II

if your date fields are numeric use $(=num(DayStart(MonthEnd(Today()))))

I can walk on water when it freezes
ali_hijazi
Partner - Master II
Partner - Master II

I would update these values by using num(DayStart(Rec_Dat)) as Rec_Dat in the script

then in the expression us  $(=num(DayStart(MonthEnd(Today()))))

date values that are formatted are hideous

I can walk on water when it freezes
Not applicable
Author

this is the sample application have a look at it once