Skip to main content
Announcements
Qlik Connect 2025: 3 days of full immersion in data, analytics, and AI. May 13-15 | Orlando, FL: Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
dafnis14
Specialist
Specialist

Set analysis issue with previous year

Hi All,

I'm struggling with undesired behavior of set analysis...

The table shows Year of service date, while the sales are calculated based on sales date range.

Curr_year.png

I added the following expression to calculate previous year sales,

Sum({<RsvLineCreateDate = {">=$(=vMinPrevYrResvDate)<=$(=vMaxPrevYrResvDate)"}>} [# of Seats/Rooms])

But this caused the previous service year to be displayed as well, which is not desired.

How can i control this?

Prev_Year.png

Thanks!

18 Replies
dafnis14
Specialist
Specialist
Author

Hi,

Thanks so much for you kind help!

I have a question: in the document I see it differently than the screen capture you sent:

When i select 2016, It shows the previous Year 2015 too, and you don't see the quantity for that year.

So for AMS, it should have been 938, but it shows 0...

I would need to show the selected period only (i.e, 2016) and the previous year sum..

Is this feasible?

above.png

sunny_talwar

I have a question: in the document I see it differently than the screen capture you sent:

above.png

What version of QlikView are you using? This might be related to use of a old version of QlikView

When i select 2016, It shows the previous Year 2015 too, and you don't see the quantity for that year.

So for AMS, it should have been 938, but it shows 0...

I would need to show the selected period only (i.e, 2016) and the previous year sum..

Is this feasible?

The fourth column you see in the table is the previous year. Isn't that what you were looking for? Current year and Previous year data next to each other?

Capture.PNG

dafnis14
Specialist
Specialist
Author

Yes, of course.. but that's not what i see..

I'm using qv11.2, SR13..

sunny_talwar

Did it finally work?

dafnis14
Specialist
Specialist
Author

No, it didn't.

But since on your side it did, I believe the expressions are correct 🙂

I will check it on another version too..

Thanks!

sunny_talwar

Can you check on the presentation tab, if all the setting match up

Capture.PNG

dafnis14
Specialist
Specialist
Author

Hi Sunny,

I checked, and in SR12, or qv 12, it works fine.

The only issue is with SR13.

Should i report it as an issue?

It is a problematic situation. I will have to find a workaround..

Thanks!

sunny_talwar

I would def. encourage you to report the issue to Qlik Tech.

dafnis14
Specialist
Specialist
Author

Hi Sunny,

If i may, I would like your advise regarding the above expression.

(I am using qv 11, SR9):

In general, there are orders dated with next year service date.

If we select orders dates for 2015,

In the attached table we can see that the previous period reservation dates are

pic.png

So the previous period is 2014:

pic1.png

But there are values that are shown for previous year for both service years, and I'm not sure how it's been calculated.

Maybe for such a scenario previous periods cannot be calculated?

Thanks!