I would like to create a new variable in Qlik Sense for growth rates. As an example of what I'm looking for:
[Alabama Jobs] is the main field that I'm pulling from an external database-- I would like to compute the period over period growth rate as in column three. There there a way to hard code this in the data editor ?
Then first aggregate the numbers at those levels. But that's something that's usually done in the charts, not the script. Doing those kind of aggregations in the charts gives more flexibility as selections will work nicely with that. Fixing the numbers in the script is less flexible. It's normally only done if necessary for performance reasons.
Yeah, creating a measure. I'm going to assume you have a field called Year and you're using that as dimension in your chart or table. You can use Sum([Alabama Jobs]) to sum up those amounts so you get totals for each year. If you use a simple table then you can use the Above() function to refer to the value of the row above. So Above(Sum([Alabama Jobs])) would return the sum for the previous year. You can then create a measure that divides the two values to calculate the year-on-year variation: Sum([Alabama Jobs]) / Above(Sum([Alabama Jobs])) - 1.
If you sort the Year dimension in descending order you'd need to use the Below() function instead of Above().
Ok, that's going to be more complicated. The best way to deal with this kind of problem is to add a so-called As-Of table to your data model. Before we start with that you need to view a video and read two blog posts:
The As-Of Table will be used to create a new field that will be used as dimension in the charts and in the set analysis expression that we'll need for the solution to your question. That new field will link to the real Month field so we can select the Month values we're interested in and calculate the value for the months we want to compare, e.g. Oct2016 with Oct2015. We'll need some set analysis expressions to calculate those results.
View the video and read the blog posts and let me know if you don't understand how those things will help us create the solution to your problem.