Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello everyone,
I currently have a problem or question.
I have a Qlik Sense application, based on which I create Excel reports in NPrinting.
If I now change a formula within a table, I get an error message when opening the template that a column can no longer be found.
With one or two columns this may not be a problem. I see this as problematic in large applications with multiple tables.
Apart from using master elements, are there other possibilities that I can use in this direction without the fields losing their connection?
Thanks and greetings
1. As a general rule for all my nprinting reports i use master objects and i think it is best practice as in some rare situations i experienced issues where not all coumns were coming through.
2. For Master Measures i use variables. Variable contains whole expression in it (for example: sum({<IsTY={1},Country={'Australia},State=>} Sales). Any change to the measure definition is done directly in variable. I keep variables in excel file and i load them during reload
3. Yes i did. Adjusting report after change can be complex. As NPrinitng report is a static report it is not ment to be changed often. If the change is only based on expression definition using variables and master objects can simplify this process as you only change it in Qlik and NPrinitng stays untouched.
by the way. I do not get what do you mean by changing "field by field"
I take it actually one step further and I use Master Item and within master item i use variable as expression. This prevents it from sometimes funny behaviour when columns are not passed through to NPrinting properly
Thanks for the answers.
@Lech
You are using a variable within the master elements which contains the actual formula, right?
Did you already have the general case (without master elements) that you had to adjust a report afterwards?
If yes, how could this simply be done, currently I only see the possibility to change field by field.
1. As a general rule for all my nprinting reports i use master objects and i think it is best practice as in some rare situations i experienced issues where not all coumns were coming through.
2. For Master Measures i use variables. Variable contains whole expression in it (for example: sum({<IsTY={1},Country={'Australia},State=>} Sales). Any change to the measure definition is done directly in variable. I keep variables in excel file and i load them during reload
3. Yes i did. Adjusting report after change can be complex. As NPrinitng report is a static report it is not ment to be changed often. If the change is only based on expression definition using variables and master objects can simplify this process as you only change it in Qlik and NPrinitng stays untouched.
by the way. I do not get what do you mean by changing "field by field"
Hello Lech,
I'll try to give you an example.
I have a table with 10 fields. I use these 10 fields individually in the designer.
If I now adjust 5 of the 10 fields (i.e. change the formula) I get the error message that this field can no longer be found, because NPrinting links via the field name (or if there is no name, then via the formula).
The only solution I know of is to drag and drop the 5 "customized" fields again.
Hence the question if there is a way to correct this more easily.
I think the problem sits in naming. What do you call field?
In Qlik Sense Table you have Dimensions and Measures as shown on picture.
now,
if you are talking about dimensions, then yes - there is no other way but changing it one by one in Qlik Sense and in NPrinting. Dimensions are driving granularity of the data in your table so they fundamentally change the context of the report.
However If you are talking about measure, then measure effectively is an expression. Expression can be incapsulated in variable. Say my variable vSales has now definition Sum(Sales)
the next step i do is I create a master measure and i use a variable as expression.
Now i use this master measure in the table which is used in Nprinting.
If i decide that this measure definition has to change i only have to change content of variable.
Thats all.
I do not know if that answers your question, but at the end this is all what you can do to minimize effort required for changes in report.
Hi Lech,
Thank you for the full explanation.
Field for me means dimension or formula, excuse the bad naming.
You use the variable inside the master elements because you manage the formulas in Excel or is there another reason?
yeah, so we have to distinguish between field (dimension/calculated dimension) and measure (formula/expression). That is very important to see a differenece.
Now down the question regarding why I am using variable in master objects - well, i use it because I came from old generation of QlikView users where maintaining expressions in variables is a key.
You may find online that this is not a good practice anymore: https://qlikcentral.com/2019/05/22/stop-storing-your-qlik-sense-expressions-in-variables/ , but i can argue with this and I have solid grounds to back my approach.
I just find it very convinient to use variables. If I have many measures which depend on each other in Excel file (or DB if it is available) it is much easier for me to track or dependencies and do master updates than directly in Master Objects in Qlik Sense.