Qlik Community

Ask a Question

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
LINKEDIN LIVE: Democratizing data to enhance customer-centricity. JULY 29TH REGISTER TODAY
cancel
Showing results for 
Search instead for 
Did you mean: 
vmehta23
Contributor
Contributor

Using Sum and another function

Hello,

My data looks something like this:

Total Mobile CostsPeriod
6010
1787
2912
19910
1168
3501
482
2754
2997
42511
1667
36
3592
45010
1009
31410
74
4556
487
717

 

I am trying to sum the Total Mobile costs based on the current selected filter (I have a filter on the sheet to choose period 1-12). So I am trying to display the previous "Period"  from current selected Period number e.g I select from filter to show Period 10 so the formula show the sum of total mobile costs of Period 9.

This is the formula I thought might work but it doesn't...:

Sum({$<Period ={(Period)-1}>}[Total Mobile Cost])

Hope my issue makes sense!

Thanks

Labels (4)
1 Solution

Accepted Solutions
sunny_talwar

Try this

Sum({$<Period = {$(=Max(Period)-1)}>} [Total Mobile Cost])

View solution in original post

2 Replies
sunny_talwar

Try this

Sum({$<Period = {$(=Max(Period)-1)}>} [Total Mobile Cost])

View solution in original post

vmehta23
Contributor
Contributor
Author

Works exactly as intended, thank you!