Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.

Hi,
I need to generate a table that consist of two years data, YOY comparison and MOM comparison.
My dimension is Month so it will tabulate monthly data for two years
Basicially I solved my YOY by using column 1 and 2 (2011 and 2012)
However, I am stuck in MOM as I have no idea to ask Qlikview to use Month minus Month-1 data
Any gurus can help on this?
is there such a thing of Column(2) - Column(1)-1?
Hi,
Do you mean month vs last month comparison?
Regards,
Janzen
Yes,
Therefore my MOM , ie March value will be March minus Feb, April value will be April minus March
((sum({$<Year = {$(v_ThisYear)},Month = , Loading = {'ID*'}>} TEU) ))))
This is my code to find 2012 expression, month is my dimension
Thinking of using current month minus previous month,
((sum({$<Year = {$(v_ThisYear)},Month = , Loading = {'ID*'}>} TEU) ))))
-
((sum({$<Year = {$(v_ThisYear)},Month = , Loading = {'ID*'}>} TEU) )))) ---> how do i derive previous month
Hi,
If its based on current month you can use this as basis..
For current month:
sum({<Month = ("$(=max(Month))")>}value)
For last month:
sum({<Month = ("$(=max(Month)-1)")>}value)
You can now have MOM change
Regards,
Janzen
Thanks for the reply
However, it is suppose to show 24months data comparison.
March 2011 Value Mar 2011-Feb 2011
April 2011 April 2011 - Mar 2011
May 2011 .
June 2011 .
.
.
.Dec 2011
Jan 2012 Jan 2012-Dec2011
.
.
Dec 2012
Hi,
You should put a value for month like this
Pass the value of month to a variable
v_ThisMonth = max({<Year = {$(v_ThisYear)} >} Month)
current month and year:
((sum({$<Year = {$(v_ThisYear)},Month = {$(v_ThisMonth)}, Loading = {'ID*'}>} TEU) ))))
current month last year:
((sum({$<Year = {$(v_LastYear)},Month = {$(v_ThisMonth)}, Loading = {'ID*'}>} TEU) ))))
Regards,
Janzen
Hi,
Tried but diden work out. However this code will only provide the month data?
Is that the comparison data value?
Hi,
Could you attach a sample file?
Regards,
Janzen
I will try to attach a sample file.meanwhile I am usinng if else statement to derive MOM
=if(Month = 'Feb',
(sum({$<Year = {$(v_ThisYear)},Month={'Feb'}, Unlocode_Port_Of_Loading = {'ID*'}>} TEU)
-
sum({$<Year = {$(v_ThisYear)},Month={'Jan'},Unlocode_Port_Of_Loading = {'ID*'}>} TEU)),
if(Month = 'Mar',
(sum({$<Year = {$(v_ThisYear)},Month={'Mar'}, Unlocode_Port_Of_Loading = {'ID*'}>} TEU)
-
sum({$<Year = {$(v_ThisYear)},Month={'Feb'},Unlocode_Port_Of_Loading = {'ID*'}>} TEU))
))
However, it is not working