Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for
Did you mean:
Anonymous
Not applicable

## Previous period in one column with current (pivot table)

I am wondering, it is possible to get previous period sum in one column with current period?

for ex. now, i have table like this:

I use  this formula for calculating last period

=SUM({\$< Field1 = {'Income'} ,  Period = {"\$(=

'>=' & NUM(ADDYEARS(MIN(Period),-1))  & '<=' & NUM(ADDYEARS(MAX(Период),-1))

)"}>}  Value)

1 Solution

Accepted Solutions
MVP

Try this

Before(Sum({\$<Field1 = {'Income'}, Period = {"\$(='>=' & Num(AddYears(Min(Period), -1)) & '<=' & Num(AddYears(Max(Период), -1)))"}>} Value))

Missing Manual - Before() and After()

3 Replies
MVP

Try this

Before(Sum({\$<Field1 = {'Income'}, Period = {"\$(='>=' & Num(AddYears(Min(Period), -1)) & '<=' & Num(AddYears(Max(Период), -1)))"}>} Value))

Missing Manual - Before() and After()

Partner - Master

use another Dimension than year maybe?

Anonymous
Not applicable
Author

Sunny, thx =). It's helped

Community Browser