Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all,
currently I am working on a problem which a lot of people might have:
My application includes a lot of different filters for the time-dimension (Year,Quarter,Month, Week, Day, Weekday, ...).
For a year-to-date - analysis I am doing sth. like:
Sum({<Date={'>=$(vMaxDateYearBeginning)<=$(vMaxDate)'}>} Income)
My problem now is:
If users select a year (e.g. 2015), the year-to-date kpi for maxYear-1 is null because in my set analysis I have to add all the time-filters as follows:
Year=,Quarter=, ...
As these filters might get more in future, I want to create a variable called vSetAnalysisYTD, vSetAnalysisYTDLastYear,... in order to change the variable later and not every formula.
But when I use these variables in a formula, an issue is recognized by Qlikview because it looks like:
Sum({<$(vSetAnalysisYTD)>} Income)
Is there an easy way to tell Qlikview that this is a possible way (as this formula works)?
Thanks for any idea!
The syntax checker does not expand variables and check the resulting code, so it might and will e.g. use the red squiggles to denote a problem where in fact there isn't one. I don't know a way to get around this.
Please read also
I'm afraid I don't understand the problem. Can you post a small qlikview document that demonstrates the problem?
The syntax checker does not expand variables and check the resulting code, so it might and will e.g. use the red squiggles to denote a problem where in fact there isn't one. I don't know a way to get around this.
Please read also
Hi,
here is a very simple application. The editor in the textbox shows a mistake where actually there is non. Is there any solution (create the variable on another way,...)?
Problem is that I am not really able to check complicated formulas if I write them like this.
Ah, that. Well, Stefan answered your question above. The syntax editor doesn't resolve the expansion of the variables. That's often not possible since the variables will only get 'real' values at run time.
No, the only problem is to check long formulas if they are really incorrect. Any solution for this?
Test, test and test. First hardcode your set modifiers and test your set analysis expressions. Then use variables with hardcoded variables and test your expressions. Then test the expressions in your variables to make sure the variables with get the correct values. As said, the syntax checker cannot resolve dollar expension of the variables.
That's what I expected and "feared". Thanks!