Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have the following code in my script:
SET eYTD = 'sum({$<Year = {$(=max(Year))}, Month = {"<=$(=max({<Year={$(=max(Year))}>} Month))"}>} LineSalesAmount)';
I want to use "eYTD" in my charts as an expression. But after a reload the content of "eYTD" is:
sum({$<Year = {(internal error)}, Month = {"<=(internal error)"}>} LineSalesAmount)
Any suggestion?
First, you want to use Let instead of Set. Then in your expressions, replace all of the dollar signs with:
' & Chr(36) & '
So:
LET eYTD = 'sum({' & Chr(36) & '<Year = {' & Chr(36) & '(=max(Year))},
Month = {"<=' & Chr(36) & '(=max({<Year={' & Chr(36) & '(=max(Year))}>} Month))"}>} LineSalesAmount)';
Then once you reload, QlikView will put in the dollar signs, but not evaluate the dollar sign expansion. Your variable should contain the Set Analysis expression and it should work in your charts.
First, you want to use Let instead of Set. Then in your expressions, replace all of the dollar signs with:
' & Chr(36) & '
So:
LET eYTD = 'sum({' & Chr(36) & '<Year = {' & Chr(36) & '(=max(Year))},
Month = {"<=' & Chr(36) & '(=max({<Year={' & Chr(36) & '(=max(Year))}>} Month))"}>} LineSalesAmount)';
Then once you reload, QlikView will put in the dollar signs, but not evaluate the dollar sign expansion. Your variable should contain the Set Analysis expression and it should work in your charts.
It worked.
Thx NMiller!
Hi Dimitri and NMiller,
How you have used the eYTD field in your expressions in chart?
I used it like
I gave just =eYTD in the expression in the chart,
the table is showing the whole expression instead of evaluating that expression.
so how to use that eYTD in expression in chart?
Can you please help me?