Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Formulas provide you with the means to calculate unique values in QlikView and then export them from QlikView into your reports. Formula use in NPrinting will be explored in this tutorial. It is presumed that you are familiar with more the fundamental aspects of Excel template creation using NPrinting. If not, see How to Create Excel Reports and How to Create One or More Levels in Excel Reports.
First of all, formulas must be QlikView formulas, i.e. they must use reserved words as defined for QlikView and according to QlikView syntax. Formulas to be used in NPrinting must evaluate to a unique value. Please notice that =getCurrentSelections() returns a unique string - it's composed by merging the selected values with a separator, but it's a single string so this function is admitted.
The series of formulas that will be created here are simple because the objective is to show how to use them in NPrinting and we do not want to distract your attention from this. The formulas will be employed with and without numerical and time formatting. NPrinting sends the formula to QlikView for evaluation and any numerical or time formatting must be applied by QlikView at the moment of evaluating the formula to its unique value. The value is exported from QlikView with whatever numerical or time formatting that has been applied and will fail to be altered by any attempt to apply similar formatting in the template. The result of using formulas in levels and pages will also be demonstrated.
Add as many as you want.
Drag the formula node tokens into the template and drop them onto the appropriate empty cells one at a time.
You see the QlikView source formatting when you click on Preview.
Cells containing formulas or variables will appear in your report with formatting from the source until you apply formatting in Excel. They will then appear in your report with the formatting you apply with Excel formatting tools.
Formatting for fields is controlled from the Properties menu of the table or field (see Can I apply Excel formatting to my Excel reports?😞
Click on Preview to see the results of the changes you have made, close Excel, adjust your formatting, and preview again until it is just right.
The rows containing the level tags will be eliminated during report generation, but leave room for the Year heading we ar going to include.
Click on the Preview icon and note that each country has a separate sheet or page.