Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
kamalqlik
Partner - Specialist
Partner - Specialist

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
SunilChauhan
Champion II
Champion II

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

Sunil Chauhan
its_anandrjs
Champion III
Champion III

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