Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
HI there
I'm trying to apply the Set statement, with the dollar sign expansion, to calculate the previous year's Value but i keep on getting the selected year's Value only. Note Year field is called EYear and is simply the year.
I've tried the following:
1. =Sum( {$<EYear = {$(=(EYear)-1)}>} Value)
2. =Sum( {$<EYear = {$(=Only(EYear)-1)}>} Value )
3. =Sum( {$<EYear = {"$(=Only(EYear)-1)"}>} Value )
It doesn't work in a bar chart and it doesn't work in a text box. What am i doing wrong?
=Sum( {$<EYear = {"$(=max(EYear)-1)"}>} Value)
That's because EYear and Eyear are two different fields to Qlikview. Make sure to use the exact case sensitive file name.
Hi Gysbert
You are correct. I checked the field names and i was using "EYear" and should have used "Eyear".
I'm so dumb and embarrassed. Sorry for wasting everyone's time. I appreciate all the quick responses!
kush14101987 arulsettu ahmar811 chanty4u @sunnyT tresesco prashantsha
Ps. I was wondering why the field name was accepted...
I added the field name to a text box: =EYear. It showed 'Bad field name ' whereas in the Set expression i created this was not indicated. Perhaps this helps someone oneday