Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello everyone,
Please help into this, i have one single table, i am getting Last Year values from the same table by using key ( i created the key based on the year and other objects)
Can you please look into the image for the issue.
If you look the value for the 2011 the last year value (2010) is coming properly, but if see 2012 value, the last year value (2011) is not coming properly,
Can any body tell what is the issue.
Thanks in advance
You can use ABOVE function or BEFORE function
Thanks for your response Enrique,
Can you please tell me where to use, since i am very new to qlikview.
Thanks
Hi,
What expression you are using to calculate last Year Values??
Regards,
An simple example
Hi,
It's difficult to help without looking at the object/expression. I'd receommend you to post the sample QVW file and one of us will help you.
Cheers,
DV
www.QlikShare.com
Hi Max, I am getting Last year data by using below code( i wrote at script level)
Table1:
LOAD
Year-1&'-'&Month as %Key1;
Load
DATE,
MonthNo,
Revenue
FROM
Table(qvd)
Left Join(Table1)
LOAD
Distinct
Year&'-'&Month as %Key1,
Revenue as LY_Revenue,
FROM
Table1.qvd
i am creating one more qvd , i am using that, when i place year, revenue, LY Revenue, it is having the issue, please look at the screen shot, If you look the value for the 2011 the last year value (2010) is coming properly, but if see 2012 value, the last year value (2011) is not coming properly,
Please help into that
Hi Deepak, I am getting Last year data by using below code( i wrote at script level)
Table1:
LOAD
Year-1&'-'&Month as %Key1;
Load
DATE,
MonthNo,
Revenue
FROM
Table(qvd)
Left Join(Table1)
LOAD
Distinct
Year&'-'&Month as %Key1,
Revenue as LY_Revenue,
FROM
Table1.qvd
i am creating one more qvd , i am using that, when i place year, revenue, LY_Revenue, it is having the issue, please look at the screen shot, If you look the value for the 2011 the last year value (2010) is coming properly, but if see 2012 value, the last year value (2011) is not coming properly,
Please help into that
Hi Enrique, I am getting Last year data by using below code( i wrote at script level), i think above and before function i can not use here
Table1:
LOAD
Year-1&'-'&Month as %Key1;
Load
DATE,
MonthNo,
Revenue
FROM
Table(qvd)
Left Join(Table1)
LOAD
Distinct
Year&'-'&Month as %Key1,
Revenue as LY_Revenue,
FROM
Table1.qvd
i am creating one more qvd , i am using that, when i place year, revenue, LY Revenue, it is having the issue, please look at the screen shot, If you look the value for the 2011 the last year value (2010) is coming properly, but if see 2012 value, the last year value (2011) is not coming properly,
Please help into that
You can use:
Sum({<yourYear=,yourMonth=,YearField = {'$(=Max(YearField)-1)'}>} Sales)