# QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Contributor

## bar chart sum last year total

hi all,

bar chart sum last year total

sum( {\$<Year={"<=\$(Year)-1"}>} value)

Dimensions : if(MonthYear >= '012013',MonthYear)

bar chart value :

012013 > 60

022013 > 60

032013 > 60

042013 > 60

052013 > 60

062013 > 60

072013 > 60

082013 > 60

092013 > 60

102013 > 60

112013 > 60

122013 > 60

12 Replies
Honored Contributor II

## Re: bar chart sum last year total

try

SUM({<Year = {'\$(=max(Year)-1)'}>}value)

Regards

Al

Honored Contributor II

or you could try

Contributor

## Re: bar chart sum last year total

Hi Alan,

expression you sent ;  SUM({<Year = {'\$(=max(Year)-1)'}>}value)

should be ;

Contributor

## Re: bar chart sum last year total

Hi Alan,

expression you sent ;  SUM({<Year = {'\$(=max(Year)-1)'}>}value)

should be ;

Honored Contributor II

## Re: bar chart sum last year total

so should it be

SUM({<Year = {'\$(=max(Year))'}>}value)

which will give

Contributor

## Re: bar chart sum last year total

should be ;

I want to be like

example : 012013 value >> 2012 vales total 60

012013 > 60

022013 > 60

032013 > 60

042013 > 60

052013 > 60

062013 > 60

072013 > 60

082013 > 60

092013 > 60

102013 > 60

112013 > 60

122013 > 60

Honored Contributor II

Contributor

## Re: bar chart sum last year total

Thanks Alan,

There is a more  problem with,

Year to day total

how can ?

example : bar chart Dimensions >> montyear 08-2013

< 08-2013 + > 01-2013

value YTD total > 80+70+60+50+40+30+20+10 = 360

example : bar chart Dimensions >> montyear 07-2013

value YTD total > 70+60+50+40+30+20+10 = 280

Honored Contributor II

## Re: bar chart sum last year total

Hi,

See below, maybe this could get the result you need