Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Set Analysis is not working properly

Hi,

I have created 2 straight tables to compare the data of selected year and its previous year.

In first table I am showing the  previous year data using the below condition in set analysis for year->

Year = {$(=GetFieldSelections(Year)-1)}

And in 2nd table I am using ->  Year = {$(=GetFieldSelections(Year))} in set analysis.

When I am selecting any year, in 1st table it shows proper data of selected year but in 2nd table it shows only its total at the top. I have sorted the column in descending order but still it is not showing any data in the table except total.

I am attaching the screen shot.

can anyone please help me on this?

- Poonam

1 Solution

Accepted Solutions
sunny_talwar

Check it out now

Capture.PNG

The actual issue was the you were multiplying your expressions with a field and that was not having the Year - 1 set analysis. So as soon as you selected a year that particular part of the expression didn't know how to handle the multiplication. Not sure how the Total worked. but adding the same set analysis to the field fixed the issue on all three of your expressions.

View solution in original post

11 Replies
sunny_talwar

Can you share the complete expression? and there is nothing to see even when you scroll down?

Not applicable
Author

Hi Poonam, could you attach the .qvw file?

If the straight table it's the same, only with condition of year & year -1, it's strange!

Attach the file please for that I can help you !

Regards

Not applicable
Author

Hi Pooman, I think..

Try this:

Year = {$(=GetFieldSelections(Year))}-1





Anonymous
Not applicable
Author

Hi Leira,

Thanks for your help.

But still it is not working

-Poonam

Anonymous
Not applicable
Author

Hi,

I am attaching the QVW file.

-Poonam

sunny_talwar

Check it out now

Capture.PNG

The actual issue was the you were multiplying your expressions with a field and that was not having the Year - 1 set analysis. So as soon as you selected a year that particular part of the expression didn't know how to handle the multiplication. Not sure how the Total worked. but adding the same set analysis to the field fixed the issue on all three of your expressions.

sasikanth
Master
Master

HI,

Try like,

Year= {$(=max(Year)-1)}


= sum({<Stage ={'S','L','D','Q'}, Year = {$(=max(Year)-1)},

[Closure Reason]={'*'}-{'Admin Error','D-Admin Error or Duplicate value', 'Opportunity Consolidation or Duplicate Value', 'D-Oppty Consolidation'}>}

([Booking Amount Euros] *[Change Rate Value] ))

Mahamed_Qlik
Specialist
Specialist

Hi Poonam,

If your trying to comparison of data between two duration of time then better you go with the Alternate State.

Here you will get the info about the Alternate State.

About Alternate state.

Hope it will help.

Regards,

Mahamed

Anonymous
Not applicable
Author

Hi Sunny,

Great!! It is working now. Thank you so much for your help

That means the main idea is if we are performing multiplication in the expression then for 2nd expression also we need to apply set analysis?

But how it was working for 1st table(current selected year)?

-Poonam