Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi folks,
Please view the image below before hand:
I would like to know how I could calculate the difference based on the values of the rows. What I mean here is, for e.g. IF I wanted to calculate the difference between the no. of users for 2/2014 and 1/2014, how could i do so? Derive the value of the current month minus its previous month.
Thanks in advance.
Best Regards,
R
May be like attached sample
Try with above()/below() functions. If any doubt, try to share a sample qvw and explain expected output there.
Hi tres,
Will try it out and get back to you on that. Thanks.
Hi tres,
Attached herewith is a sample .qvw.
Please do have a look at it, I have placed a comment in the script to explain what is my desired results
Cheers
Hi Ram,
PFA....
Regards
Ankur
May be like attached sample
Check enclosed file...
Thanks tres!
Hi Ram,
You can Use this script to derive difference between no. of users for current month minus Previous month.
Source :
LOAD * INLINE [
Year, Quarter, MonthOfYear, UniqueChargedUsers
2012, 2, 5, 22030
2013, 4, 12, 58521
2014, 1, 1, 72378
2014, 1, 2, 52969
];
NoConcatenate
Source1:
Load *
Resident Source
Order by Year, MonthOfYear;
Drop Table Source;
Source2 :
Load
Year,
MonthOfYear,
UniqueChargedUsers,
if((Year = Peek(Year) and MonthOfYear = Peek(MonthOfYear) + 1 ) or(Year = Peek(Year) + 1 and MonthOfYear = 1 and Peek(MonthOfYear) = 12 ),UniqueChargedUsers-Peek(UniqueChargedUsers)) as DiffrenceOfCurrentAndPreviousMonth
Resident Source1;
Drop Table Source1;
Result will be like this.
Regards,
Vivek