# Qlik Sense App Development

Valued Contributor II

## How to make my chart 1 with out select yr=2015 ?

Hi All

My chart 1 is correct , but need to select year = 2015 , may i know how to make like chart 2 ( wrong result ) don't need to select year = 2015.

in other word , i have create a chart 2 , some how it give the wrong value.

Paul

1 Solution

Accepted Solutions
Not applicable

## Re: How to make my chart 1 with out select yr=2015 ?

Set Analysis will let you do it.

Set Analysis: syntaxes, examples

Create a variable which contains the selected year, then your set analysis would be:

SUM({\$<[YourYearField] = {'\$(=vYearVariable)'>} [YourMeasure])

for Chart1

and

SUM({\$<[YourYearField] -= {'\$(=vYearVariable)'>} [YourMeasure])

for Chart 2

3 Replies
Not applicable

## Re: How to make my chart 1 with out select yr=2015 ?

Set Analysis will let you do it.

Set Analysis: syntaxes, examples

Create a variable which contains the selected year, then your set analysis would be:

SUM({\$<[YourYearField] = {'\$(=vYearVariable)'>} [YourMeasure])

for Chart1

and

SUM({\$<[YourYearField] -= {'\$(=vYearVariable)'>} [YourMeasure])

for Chart 2

Valued Contributor II

## Re: How to make my chart 1 with out select yr=2015 ?

Hi Andrew

Thank you for the SET Doc , yesterday i read after few page for about 20 mins , i can feel my head very pain , will continous reading when i free.

Paul

Not applicable

## Re: How to make my chart 1 with out select yr=2015 ?

Stick with it - Set Analysis is very useful. I have required it everyday!