Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
katetsan
Creator
Creator

Cumulative value and display specific period

Hi Experts,

I'm facing two problems,

1st  :  I'm creating a bar chart, the Year-Month would be the x axis and the expression would be as below. 

The expression works fine. But the chart will show all Year-Month from the very beginning. How could I show only latest two years or depends on filter selections? 

Expression1: =RangeSum(Above(Total Sum({<[Accounting Code]={"001131*"}>}[AR Balance Amount]),0, rowno()))

 

2nd  :  How could I create a line chart and the value would be accumulated by year?

Thanks in advance.

Kate

 

2 Replies
katetsan
Creator
Creator
Author

Hi Experts,

I've revised the expression of the first issue as below. It works well, but the chart shows all Year Month from the very beginning.

Expressions: =Aggr(RangeSum(Above(Total Sum({<[Accounting Code]={"001131*"}>}[AR Balance Amount]),0, rowno())), [Company Name], ([Accounting YearMonth], TEXT))

However, I still couldn't find the solution to display the latest 2 years or depends on filter selections, and the cumulative value won't change despite of year month selections.

Thanks in advance.

Kate

sunny_talwar

May be this

=Aggr(RangeSum(Above(TOTAL Sum({<[Accounting Code] = {"001131*"}, [Accounting YearMonth]>} [AR Balance Amount]), 0, RowNo())), [Company Name], ([Accounting YearMonth], TEXT))