Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I want to count how many items I got in stock this month compared to what was in stock at the same time last year.
So something like this:
( {<MONTH={$(vCurrentYearMonth)},MONTH = {$(vLastyearMonth)},ItemNumber={'76319','76329'} >} Items) plus the big problem
I want to count this month 27 days of oktober 2014 and 27 days oktober 2013
Send me your .qvw, will create it for you
I have set the variable vToday - but when used in the expression its not recognized as a variable
sorry I cant send you the qvw file - it contains data that is just fore my eyes
create a dummy data and sent it across
hey soren,
vDay=day(today())
vMonth=month(today())
vCurrentYear=year(today())
vPreviousYear=year(today())-1
number of items for current year
sum/count({<month={"$(vMonth)"},day={"<=$(vDay)"},year={"$(vCurrentYear)"}>}items)
number of items for previous year
sum/count({<month={"$(vMonth)"},day={"<=$(vDay)"},year={"$(vPreviousYear)"}>}items)
the count would be used if number of items is listed separately for an item number .what is mean is if from item number '76319' you got 5 items and they are all entered separately. that is 5 separate entries for item number '76319'.
otherwise you would use sum.
hope it helps!
cheers
kunal bhattacharya
Hi kunal
I tried working with your expression but ran into some trouble
AS you can see after the vDay)} somethings is wrong
I removed all “” because my data is numeric
regards
Fra: kunal bhattacharjee
Sendt: 29. oktober 2014 08:19
Til: Schou, Hans Henrik Søren (SSC009)
Emne: Re: - SET Analysis expression help
Qlik Community<http://community.qlik.com/>
SET Analysis expression help
reply from kunal bhattacharjee<http://community.qlik.com/people/kunalbhattacharjee91?et=watches.email.thread> in App Development - View the full discussion<http://community.qlik.com/message/643964?et=watches.email.thread#643964>
soren,
the expression is correct. in fact , I used it in an app I made recently. unless you can provide a sample qvw, I can't tell what and why's the error.
cheers,
kunal bhattacharjee
do some RnD..since there is no error for month and day. test the set expression with those two. maybe, take a text box and test the individual variables there. you something like this, you should get it correct.
Sorry been away
Here is a sample.qvw
here is a sample