Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
I'm relatively new to QlikView and I'm working with variables for the first time.
The definition of the variables (formula) works well and shows the correct values. The value of the variable adapts to the selection.
This formula defines the variable:
=count(DISTINCT if((date(today())-Fallbeginn)>=7 and date(Entlassdatum)<=date(today())and (Therapieklasse= 'A' or Therapieklasse= 'B' or Therapieklasse= 'C' or Therapieklasse='D' or Therapieklasse='E' or Therapieklasse='F' or Therapieklasse='G' or Therapieklasse='H' or Therapieklasse='K' or Therapieklasse='L' or Therapieklasse='M'), [Patienten-ID]))
However, as soon as I want to save the selection in a bookmark and select this bookmark, the formula that defines the variable is overwritten with a number (e.g. 10). I don't know where this number comes from.
How can I prevent the formulat that dynamically defines the variable from being overwritten?
Thank you for your support!
Best regards,
Stefanie
Hi @marcus_sommer , thank you for your response! I removed the bookmark and changed the settings when insterting the new bookmark. I ticked "include input field values". This works well! Formulas for variables are not overwritten anymore.
Best regards, Stefanie
I'm not quite sure what do you want to do. An expression-result itself isn't selectable else only (calculated) dimension-values and/or (expression) searches over dimensions - which both might be stored within a bookmark.
Further without using any actions/macros setting/calling a bookmark won't overwrite a variable. Therefore I assume that your case is a bit different and you are probably struggling with the variable-content/calculation. If the variable starts with an equal-sign the expression will be evaluated (respecting the applied selections but ignoring each kind of dimensionality and calculating the results globally) and its result is assigned to the variable. If it starts not with = the variable contains just the expression-string.
- Marcus
The mathematical formula you want the = (Formula) field to evaluate. Spreadsheet-type references to table cells are valid. For example, "=SUM(A4:C4)" specifies the first three values in the fourth row. For more information about the = (Formula) field, see Field codes:= (Formula) field.
Hi Marcus,
I don't know if my explanation was clear. The formula defining the variable isn't the same as the selection in the bookmark.
In the bookmark I select a field that is not mentioned in the formula for the variable.
As soon as I select the bookmark, the formula for the variable is overwritten.
(the formula for the variable starts with "=")
If I choose the same selction manually, the formula is NOT overwritten.
How can this happen?
Thank you very much in advance!
Best regards,
Stefanie
Hi Rodriguez,
could you explain with an example what you mean? I can't follow.
Thank you!
Best regards, Stefanie
If the option is enabled to store the variable-value within a bookmark - needs a setting within the variable-properties and also within the bookmark-properties - the call of the bookmark will set the variable to this value which was stored at the time of creating the bookmark. This may in your case just the fixed value of 10. If you have later changed the variable to an expression this content will be overwritten with the stored value and don't changed afterwards again.
In this case I suggest to remove the bookmark and to re-create it with the current selections and variable-values.
- Marcus
Hi @marcus_sommer , thank you for your response! I removed the bookmark and changed the settings when insterting the new bookmark. I ticked "include input field values". This works well! Formulas for variables are not overwritten anymore.
Best regards, Stefanie
Thanks for letting us know about this procedure for making an effective application! Being a software developer, I have learned a lot of things from this post!
brune nue