# 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.
Valued Contributor

## Logic Problem

Hi Guys,

>

>

> I want some logic .

>

> 1)If I select any year I want sum of freight upto that

> year..example If I select 2007 I should get sum from 2003

> to 2007 not only 2007

>

> 2)Same logic for month..If I select Mar.I should get sum

> from Jan to Mar.

>

> 3)Same  logic for Quarter..If I select Q2.. I should get

> sum of Q1 and Q2.

>

> 4)Same logic for Week.If I select week 5.I should get sum

> of week 1 to 5.

>

> 5) Same logic for day...

>

>

> I Know it's very simple for You Guys. So want to hear you

> ASAP.

2 Replies
Esteemed Contributor

## Logic Problem

for year

Sum({\$<[Year]={\$(=max(Year)>} [AMOUNT ])

for month

Sum({\$<[Year]={\$(=max(Year))},MonthNO={"<=\$(=max(MonthNO))"}>} [AMOUNT ])

implemeent according to above for week day and quarters

thanks

Sunil Chauhan

MVP

## Re: Logic Problem

Hi,

Use some thing like this for Year

For Year

=Sum({<Year ={">=\$(=Year(Today())-4)  <=\$(=Year(Today()))"} >} Sales)

For Month

=Sum({<Month={">=\$(=Month(Today())-4)  <=\$(=Month(Today()))"} >} Sales)

HTH

Regards

Anand