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

Announcements
See why IDC MarketScape names Qlik a 2025 Leader! Read more
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

I used fYear because I had fYear as the Year filed, you use you Year field and correspondingly replace all fields with your relevant fields.

Not applicable
Author

OK I tried that OK

What is %Master Date

alkesh_sharma
Creator III
Creator III

Its the date field.

alkesh_sharma
Creator III
Creator III

I had the same requirement for my client and after a lot of research, I finally created the expressions which I shared.

You just need to tweak it a little to fit in with your data set.

Not applicable
Author


I´m trying - but not beeing especially good with the syntaxes I run into trouble like this

screenshot.2.jpg

Where the expression dies and i cant find the error - even Expression is OK

chematos
Specialist II
Specialist II

What is the problem with the variable? Have you added the variable as the other ones you have?

You could set the expression without the variable and see if it works, you need to have Day field as numeric

vCurrentDays = Day(Today())

Current Year:

Count({<Month={$(vCurrentYearMonth)}, Day={<=$(=Day(Today())},Year={$(=only(Year))},ItemNumber={'76319','76329'}>} Items)

Previous Year:

Count({<Month={$(vCurrentYearMonth)}, Day={<=$(=Day(Today())},Year={$(=only(Year)-1)},ItemNumber={'76319','76329'} >} Items)

alkesh_sharma
Creator III
Creator III

Try This:

Count({<AAR= {$(vMaxYear)}, MAANED = {$(vMaxMonth)}, DATE = {"<=$(='$(vToday)')"} >}

You made a syntax error, " " are missing..

Not applicable
Author

No I got the ”” but still get an error or no data

Using the “ ” and the ‘ ‘ around the vToday makes it searching for a text field, - right?

Fra: Alkesh Sharma

Sendt: 28. oktober 2014 12:24

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 Alkesh Sharma<http://community.qlik.com/people/alkesh.sharma?et=watches.email.thread> in App Development - View the full discussion<http://community.qlik.com/message/643101?et=watches.email.thread#643101>

Not applicable
Author

You may not see it because of the color but vToday is not recognized as a variable

Fra: Alkesh Sharma

Sendt: 28. oktober 2014 12:24

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 Alkesh Sharma<http://community.qlik.com/people/alkesh.sharma?et=watches.email.thread> in App Development - View the full discussion<http://community.qlik.com/message/643101?et=watches.email.thread#643101>

alkesh_sharma
Creator III
Creator III

Soren,

I guess you need to learn the qlikview basics before you go on to these complicated expression.

vToday is a Variable. you have to set a this variable and then use it in the expression..

Guess you just copies what I gave you and trying to run it. It doesn't work like this