# New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Contributor

## Set analysis expression help

Hi Experts,

I have a bar chart with YTD amount in first bar chart  like below.

I have used the below expression

=Sum({\$<Year={'\$(=Year(Max(Date)))'}>}[Amount gain])/100000)+

Sum({\$<Year={'\$(=Year(Max(Date)))'}>}[Amount Spent])/100000)

From these 2018 ytd bar chart I have to show 2018 each month amount like 2nd bar chart

Current Month amount-Previous month amount for getting only that month amount instead of ytd amount.

1 Solution

Accepted Solutions
Honored Contributor II

## Re: Set analysis expression help

you could change it in:

if( num(your_month_dimension) = 1, column(1), column(1) - above(column(1)) )

4 Replies
Valued Contributor

## Re: Set analysis expression help

Why are making complicatiuons,

simple use month as dimension and use expression as

=Sum({\$<Year={2018}>}[Amount gain])/100000)+

Sum({\$<Year={2018})/100000)

The Bar chart will show monthly amounts in 2018 only

Honored Contributor II

## Re: Set analysis expression help

let's try as below:

column(1) - above(column(1))

Contributor

## Re: Set analysis expression help

Hi agigliotti,

The expression is working for all the months except Jan.

For Jan need to keep the actual amount from feb the above calculation need to apply.