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

Announcements
Qlik and ServiceNow Partner to Bring Trusted Enterprise Context into AI-Powered Workflows. Learn More!
cancel
Showing results for 
Search instead for 
Did you mean: 
mahitham
Creator II
Creator II

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

you could change it in:

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

View solution in original post

4 Replies
arvind1494
Specialist
Specialist

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

let's try as below:

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

mahitham
Creator II
Creator II
Author

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

you could change it in:

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