Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

mahitham
Contributor

Set analysis expression help

Hi Experts,

Can any one please help me on below requirement.

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


For this please help me to change the above expression like 2018

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

Thanks in advance

1 Solution

Accepted Solutions
agigliotti
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
arvind1494
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

agigliotti
Honored Contributor II

Re: Set analysis expression help

let's try as below:

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

mahitham
Contributor

Re: Set analysis expression help

Hi agigliotti,

Thanks for your reply.

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.

Please help me on this.

agigliotti
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)) )

Community Browser