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

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
qlikview979
Specialist
Specialist

Set Analysis

Hi Experts,

I have Year,Sales fields, Year field like

Year

2010

2011

2012

2013

2014

2015

2016

but i want to calculate sales between years(2011-2015) by using set analysis.

How Can i write the Expression.

Regards,

Mahesh

1 Solution

Accepted Solutions
Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

sum({<Year={'>=$(Vmin)<=$(Vmax)'}>}Sales)


talk is cheap, supply exceeds demand

View solution in original post

8 Replies
Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

sum({<Year={'>=2011<=2015'}>}Sales)


talk is cheap, supply exceeds demand
qlikview979
Specialist
Specialist
Author

Hi Bro,

Thanks Its working.

But I Have two Variables

Vmax=Max(Year)

Vmin=Min(Year)

How can i use this

vijetas42
Specialist
Specialist

Instead of hard coding year you can use variables like this way,sum({<Year={'<=$(Vmax)>=$(Vmin)'}>}sales)

Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

sum({<Year={'>=$(Vmin)<=$(Vmax)'}>}Sales)


talk is cheap, supply exceeds demand
qlikview979
Specialist
Specialist
Author

Hi  Vijeta,

Thanks  its working 

I have one more doubt   Where can i use YearEnd().

Regards

qlikview979
Specialist
Specialist
Author

Hi Thanks Bro,

Its working Perfectly.

I have one more doubt   Where can i use YearEnd().

Regards

Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

Somewhere were you need to calculate the last day (and time) of the year of a date. See the help file for more information.


talk is cheap, supply exceeds demand
qlikview979
Specialist
Specialist
Author

Hi,

Thanks Bro,

Regards

Mahesh