# QlikView Layout & Visualizations

Discussion Board for collaboration on QlikView Layout & Visualizations.

Contributor

## Set Analysis

To sum some values we use the following function: sum( Value )

Example:

sum( TotalSales )

But, what to do if you want just view the sales of 2014 ?

We can use the Set Analysis, then don't need make SQL script.

Using Set Analysis:

sum( {<Year = {'2014'}>}  TotalSales)

This will sum the TotalSales of 2014, without othes years

Tags (2)
6 Replies
Valued Contributor II

## Re: Set Analysis

Hi Marcus,

What you want Exactly???

Honored Contributor II

## Re: Set Analysis

Try this

make a variable vMaxYear

=max(Year)   //Expression for variable

then on expression side

SUM(Total {<Year={'\$(vMaxYear)'}>} Sales)

or this one also

SUM({1} {<Year={'\$(vMaxYear)'}>} Sales)

Honored Contributor III

## Re: Set Analysis

Dynamic

Sum({\$< Year = {\$(=Max(Year))}>} Sales )

vikas

Contributor

## Re: Set Analysis

This is just a exemple for begginers.

Thanks.

Honored Contributor III

## Re: Set Analysis

See Dynamic Full .

Vikas

Not applicable

## Re: Set Analysis

Thanks for this.

I'm trying to understand set analysis and your file is very helpfull.

I still don't make it with my proper file...

I can see your formulas but there is no numbers. For instance sum (...) match, but sum ( {\$} ... ) don't.

My question is :

Can my QV version be too old to set analysis? (QV 8.2)