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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

SET Analysis expression help

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

30 Replies
alkesh_sharma
Creator III
Creator III

Send me your .qvw, will create it for you

Not applicable
Author

I have set the variable vToday - but when used in the expression its not recognized as a variable

Not applicable
Author

sorry I cant send you the qvw file - it contains data that is just fore my eyes

alkesh_sharma
Creator III
Creator III

create a dummy data and sent it across

Not applicable
Author

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

Not applicable
Author

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>

Not applicable
Author

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

Not applicable
Author

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.

Not applicable
Author

Sorry been away

Here is a sample.qvw

Not applicable
Author

here is a sample