Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
ALERT: QlikView server communication interruptions following Microsoft Windows Domain Controller security updates
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Year vs. year prior help

HI,

I have what I hope is a simple fix involving set analysis which. I can't get to work properly. I have data broken down by month (numerical) and years. I am having two issues when trying to create a bar graph. 

1. The data is plotting as a summation of the year ie continually going up verus just a month to date number.  Any thoughts?

2. Given the way the date is represented, which is the best way for my to plot year vs year prior data, and then be able to break down to month versus month year prior.

THank you for the help in advance!

Labels (1)
13 Replies
jyothish8807
Master II
Master II

Hi Justin,

can you share the app or screenshot? That will be helpful to understand the requirment.

Regards

KC

Best Regards,
KC
Anonymous
Not applicable
Author

KC,

Here are a couple of pictures of my file.  I am looking to sum the premium data but only showing for the month To date. Also, looking to view year over year.

image.jpgimage.jpg

jyothish8807
Master II
Master II

Hi Justin,

try this may be helpful.

Regards

KC

Best Regards,
KC
ToniKautto
Employee
Employee

I moved your question to the QlikView development forum, based on your QlikView screenshots. The question was originally posted in the Qlik Sense forum.

Anonymous
Not applicable
Author

KC,

Thank you for the help.  I have the personal edition currently till work upgrades.  Any type of work through?

jyothish8807
Master II
Master II

Hi justin,

Create a new field in script:

Rowno() & Month as New_Month

Take this field as Dimension

And in expression take:

SumofEran PREM

Hope it will work

Best Regards,
KC
Anonymous
Not applicable
Author

KC,

That didn't seem to work as I need to have the month name still in there and the expression above gave me over 5000 combinations.  It seems like a function similar to could work:

If(RowNo() = 1, [SumofNetWritPrem], [SumofNetWritPrem]-Peek([SumofNetWritPrem],-1))

I just can't seem to get the syntax to work.  In my data set there are 5 years of data.  The data works properly in month one, but each month subsequent is not working proper.  Any thoughts?

ngulliver
Partner - Specialist III
Partner - Specialist III

Hi, Justin.

Have you seen Steve's post on this ? It may give you some insight into how to build your prior year comparison.

QlikView App: Set Analysis - Prior Period Comparison

Cheers,

Neil

Anonymous
Not applicable
Author

Neil,

Thank you for the help.  I tried that method, but I couldn't get it to work.  Since I am on Personal edition for now, I couldn't include his work.  My data includes Month and Year and not date.  How should I append the data to properly use the variable including date.

The problem with my data seems to be as follows.  There are 30,000+ lines of data, and when I graph the sum of the field, it brings up aggregate data.  I have tried several methods but ultimately I seem to be missing the correct method.  I ultimately need month 1 which is showing correct data per each year, then I need the difference for each other month, such as the difference between (FEB and JAN) or (MAR and FEB) and so on.  I assume I need some sort of IF statement or set analysis but I am unsure of the syntax.