Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Set Analysis: What am i Doing wrong?

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?

13 Replies
Anonymous
Not applicable
Author

=Sum( {$<EYear = {"$(=max(EYear)-1)"}>} Value)

Gysbert_Wassenaar

That's because EYear and Eyear are two different fields to Qlikview. Make sure to use the exact case sensitive file name.


talk is cheap, supply exceeds demand
Not applicable
Author

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!

kush14101987arulsettuahmar811chanty4u‌ @sunnyT tresescoprashantsha

Not applicable
Author

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