# New to QlikView

Discussion board where members can get started with QlikView.

Announcements
QlikView Fans! We’d love to hear from you.
Rules, plus terms and conditions, can be found here.
Not applicable

## Problem using the set analysis

Hi,

I have a bar chart showing the total sales for each year (X-dimension = Years, Y-dimension = Total amount of sales). In the raw data set/database, i have the total amount of sales for each quarter. Fyi, one year is divided into 4 quarters. If i would like to show the total amount of sales for the last two quarters only of each year, how should i accomplish it using the set analysis? Why the below set expression does not work?

sum( {\$<QUARTER={\$(=Max(QUARTER)), \$(=Max(QUARTER))-1}>}  AMOUNT)

GK

5 Replies
Not applicable

## Problem using the set analysis

Hi,

You can right the expression like below:-

Sum({\$<QUARTER={"\$(=Max(QUARTER))"}+{"\$(=Max(QUARTER)-1)"}>}AMOUNT)

Hope this helps.

Cheers,

DJ

Not applicable

## Problem using the set analysis

Thanks DJ ... Have tried but it does not work. Thanks.

Not applicable

## Problem using the set analysis

Can you pls share the sample application?

Not applicable

## Re: Problem using the set analysis

Hi, kindly please find the attached file. I would like to have the chart to show the total sales amount of the last two quarters (Quarter 3 and Quarter 4) for each Year. So, in my example, Fiscal Year 2011 should show 700 (300 + 400), Fiscal Year 2010 should show 1500 (700 + 800). Thanks.

Contributor II

## Re: Problem using the set analysis

OK, firstly, your field is called FISCAL_QUARTER, not QUARTER, so that's