Internal behavior change of before() function in Qlikview 12 and laterArticle Number: 000039301 | Last Modified: 2019/01/17
QlikView 12.20 (November 2017) and up
The before() function does not calculate properly in Qlikview 12 and later version if we suppress zero values from the chart properties > presentation tab. This used to work in Qlikview 11.20.
1. Create new document in Qlikview desktop 12 and later version
2. Reload the document with following script:
tab: LOAD * inline [ Product ,Category ,Sales,Year Salt ,White, 30,2014 Salt, ,,2015 Salt ,Red ,30,2014 Sugar ,White ,10,2015 Sugar ,Brown ,20,2015 Sugar ,,,2014 Wine ,White ,40,2015 Wine ,Brown ,30,2015 Wine ,Red ,10,2014 ]
3. Create pivot table following dimensions and expressions.
2. Before(TotalSales) and label Before
4. From Chart properties > Presentation tab, enable partial sums for Category and Product dimensions, enable 'allow pivoting', and enable 'always full expanded'
5. Change Year dimension from column to row as shown in the screenshot.
6. You could see the different results as highlighted in Table1 from below screenshot
In order to achieve a similar (or "expected") result in QlikView 12, simply uncheck the "suppress zero-values" and all zero values become available (like in QV11). as shown in screenshot.
Have a Question?
Search Qlik's Support Knowledge database or request assisted support for highly complex issues.Submit a case
Experiencing a serious issue, please contact us by phone. View phone numbers and hours by region.