# QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements

#### Breathe easy -- you now have more time to plan your next steps with Qlik! QlikView 11.2 Extended Support is now valid through December 31, 2020. Click here for more information.

Valued Contributor II

## How to make my table YTD sales = Jan + Feb Amount ?

How to make my table YTD sales = Jan + Feb Amount ?

Hi All

I have below expression from Mr Manish  :-

SUM({<year = {"\$(=Max(year)-1)"},rEVENUE={"rEVENUE"}>}Amount*1)/1000

it work fine , but now i like to modify it , so that it can give me YTD sales .

Meaning if i click on month = 2 , i like it display jan + feb amount.

Can some one help me ?

I will post my QV sample in few minute.

PAUL

1 Solution

Accepted Solutions
MVP & Luminary

## Re: How to make my table YTD sales = Jan + Feb Amount ?

Hi,

Use this expression

SUM({<year = {"\$(=Max(year)-1)"}, month={'<=\$(=Max(month))'}, rEVENUE={"rEVENUE"}>}Amount*1)/1000

Regards,

jagan.

4 Replies

## Re: How to make my table YTD sales = Jan + Feb Amount ?

May be try this..

SUM({<year = {"\$(=Max(year)-1)"},month={"<=\$(=month)"},rEVENUE={"rEVENUE"}>}Amount*1)/1000

MVP & Luminary

## Re: How to make my table YTD sales = Jan + Feb Amount ?

Hi,

Use this expression

SUM({<year = {"\$(=Max(year)-1)"}, month={'<=\$(=Max(month))'}, rEVENUE={"rEVENUE"}>}Amount*1)/1000

Regards,

jagan.

MVP & Luminary

## Re: How to make my table YTD sales = Jan + Feb Amount ?

Hi,

Check this link for similar type of expressions if you have a date field

Set Analysis for certain Point in Time

Set Analysis for Rolling Periods

Hope this helps you.

Regards,

Jagan.

Valued Contributor II

## Re: How to make my table YTD sales = Jan + Feb Amount ?

Hi All

Both reply work , thank you very much.

Paul

Community Browser