Qlik Community

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
QlikWorld 2022, LIVE in Denver CO., May 16-19, 2022. REGISTER NOW TO RECEIVE EARLY BIRD PRICING
cancel
Showing results for 
Search instead for 
Did you mean: 
maksim_s
Contributor II
Contributor II

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
sunny_talwar

Try this

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

Read about Before/After here

Missing Manual - Before() and After()

View solution in original post

3 Replies
sunny_talwar

Try this

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

Read about Before/After here

Missing Manual - Before() and After()

View solution in original post

stabben23
Master
Master

use another Dimension than year maybe?

maksim_s
Contributor II
Contributor II
Author

Sunny, thx =). It's helped