Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
I think this is a very basic question. I have the following table in the script.
Data:
Load * Inline [
idContact, Subscription
1, 04/01/2007
2, 12/05/2007
3, 15/07/2008
4, 30/07/2008
5, 07/08/2008
];
Then I want to make a new field for Year and one for Month. I did it in the script as follows:
Data:
LOAD
Year(Subscription) as Year,
Month(Subscription) as Month
RESIDENT Data;
However I wish that Year and Month were associated with the Subscription date, which are not in my example (while a calculated dimension Year(Subscription) in a chart is associated)....
Can anyone tell me what I'm missing? Is there a nice tutorial to QV scripting available somewhere (one which is not 500 pages long...)?
Thank you very much
Try This:
Data0:
Load * Inline [
idContact, SubscriptionDate
1, 04/01/2007
2, 12/05/2007
3, 15/07/2008
4, 30/07/2008
5, 07/08/2008
];
Data1:
LOAD
Year(SubscriptionDate) as Year,
Month(SubscriptionDate) as Month,
SubscriptionDate
RESIDENT Data0;
This seems to work..
Data:
LOAD
Subscription,
Year(Subscription) as Year,
Month(Subscription) as Month
RESIDENT Data;
However QV scripting is still misterious to me...
Try This:
Data0:
Load * Inline [
idContact, SubscriptionDate
1, 04/01/2007
2, 12/05/2007
3, 15/07/2008
4, 30/07/2008
5, 07/08/2008
];
Data1:
LOAD
Year(SubscriptionDate) as Year,
Month(SubscriptionDate) as Month,
SubscriptionDate
RESIDENT Data0;