I'm currently trying to put together a straight table to show forecasted volumes, but I'm having problems with null values. My chart has one dimension - country. I then have multiple expressions calculating forecasted volumes from each of these countries. Expression 1 is as follows, and calculates the ForecastCBM for the selected week/year;
The issue is that if the value returned by expression 1 is null (i.e. no value for forecastCBM in that week / country), then the second calculation returns a null in the chart even though there is a value for ForecastCBM in week+1 (this can be proved by selecting the week+1 value in the calendar). If I set the chart to show null values, the chart shows nulls for all expressions, even when a value should be returned.
Any help would be greatly appreciated, as I can't seem to get anything to work!
Many thanks for your quick responses, this is much appreciated.
Unfortunately though, I still can't seem to get the expressions to work as desired.
The original version of my chart was similar to the suggestions you have made above, and this seemed to work ok apart from where the date parameters spanned the start of a new year (i.e. if the date selections made were 2012 week 52, I would want expression 2 to show 2013 week 1). We then got a condultant in who made the changes to the second expression and it seems to work ok except from the issue with the nulls.
This may well be a really easy problem to solve, but unfortunately my qlikview knowledge isn't great and I'm struggling!
However, I still can't seem to get the results I'm looking for. Whichever way I calculate the week numbers, I still can't get a result for the 2nd, 3rd, 4th expressions for particular dimensions if the result for that dimension on the first expression is null.
For example, if I select ForecastCal_Week 10 and there is no forecasted value for France in expression 1, expression 2 (which shows week 11) will also be blank for France. However, if i select ForecastCal_Week 11 on the calendar, expression 1 will correctly show the forecasted value for France.
The countries that have a value against them in the first expression are all correctly calculating the values in the subsequent expressions, it's just the countries that are null in the first expressions that are not doing as they should in the following expressions.