Qlik Community

Ask a Question

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
Become an analytics expert with Qlik's new 15 week course: Applied Data Analytics using Qlik Sense. READ MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Rolling sum Syntax help

Hello All,

I'm looking for some sytanx help.  I have a value in January that is loaded with the base number for the year. In the following months the change in that number is expressed. So in January I have 500 and in February I could have 2, with a total of 502. Than in march my value could be -3 leaving a total of 499. I want a dynamic way to show that 502 throughout the year. I know I need to create a variable for start as like 1.1. and using the year date. but I'm having trouble with the end date and how to construct the set analysis.

 

Thanks,

 

 

11 Replies
sunny_talwar

You want to show 502 throughout the year? Why 502? I am not sure I understand what you are looking to do... can you may be share a sample app or sample data?

Not applicable
Author

No sorry, I want it live. So In febuary I Want to show 502 and in march I want to show 499.

Not applicable
Author

The way the data is set up is theirs a base number in January (its for # of employees in a given section) and then any changes are shown from feb-dec.

sunny_talwar

Would you be able to share some sample data or sample qvw?

Not applicable
Author

I want a dynamic text object or way to express that total of 512 (I have a year selected here as well). So say it was March I want to show 467=(463+4) - The data updates once a month so it probably wouldn't have data for march yet.

Not applicable
Author

The whole table was too long and didn't show - that 512 is a total of all the months for the selected year.

sunny_talwar

May be like this:

RangeSum(Before(YourExpression, 0, ColumnNo()))

Not applicable
Author

Thanks, that would be for a table. I'm trying to have this as a separate text object or throw into a gauge chart.

sunny_talwar

Assuming your expression is Sum(Measure), try this

Sum({<DateField = {"$(='>=' & Date(YearStart(Max(DateField)), 'DateFieldFormatHere') & '<=' & Date(Max(DateField), 'DateFieldFormatHere'))"}>} Measure)

Above, DateField is a placeholder for the date field in your dashboard and use the date fields's format to replace DateFieldFormatHere

Lots of assumptions above, but I hope you can find your way around the above