Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Announcements
QlikView Fans! We’d love to hear from you.
Share your QlikView feedback with the product team… Click here to participate in our 5-minute survey.
Rules, plus terms and conditions, can be found here.
kamalqlik
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
chauhans85
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

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

Community Browser