# New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Contributor III

## delivery

hi community,

`I have several years online . What is the formula to extract all kilograms shipped separately in 2011, 2012, 2013, 2014 and in 2015 ?`
12 Replies
Honored Contributor II

## Re: delivery

COuld youpost some sample data .  So we can help you better.

Contributor III

## Re: delivery

hi,

year, totalKg

2010 1

2010 1

2010 1

2010 1

2011 6

2011 7

2011 1

2011 2

2012 4

2013 1

2013 1

2013 5

2013 20

2014 2

2014 5

I would like to use a kpi

2010                    2011               2012               2013                     2014                    2015

Year 2010               Year               Year               Year                    Year                    Actual  Year

Total 4                    16                    4                    27                         2                         0

Honored Contributor II

## Re: delivery

CAnt You pivot on year sum(totalkg)? Unless I'm missing part of your requirement.

Esteemed Contributor

## Re: delivery

Is this you are looking for??

Contributor III

## Re: delivery

Hi Fabio,

Are you looking for this output

If so, please look at the attached app. You need to generate Years to show 2015 as 0.

New Contributor III

## Re: delivery

on script level you can use following script

Sum(totalKg) as totalKg,

Year

from table

group by year;

and on front end just use simple table against this two fields..

OR

on front end chose any graph expect gauge chart then add dimension year and in expression add this

expression sum(totalKg)

Contributor III

## Re: delivery

Hi,

I need s function sum(kg, if(year= 2010) or year=2011, year=2012 year=2013 year=2014 year=2015

Contributor III

## Re: delivery

Hi,

a function similar sumif (Excel)

Contributor III

## Re: delivery

Hi Fabio,

you can go with Set Analysis to select one year at a Time like this:

Sum({<Year = {'2010'}>}kg) -> with this you'll get a measure you can use in a KPI which has all KG Values summed of Year 2010

If you need this in a Bar-Chart, you need to use Year as a Dimension and then just sum(KG) against this.

Sadly there is no KPI which shows many numbers at a time, so you'll need to use the Pivot-Table to do this, which works same as the Bar-Chart version.

Hope i helped you!

Regards

Chris