Skip to main content
Announcements
Customer Spotlight: Discover what’s possible with embedded analytics Oct. 16 at 10:00 AM ET: REGISTER NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Associating data in the script

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

1 Solution

Accepted Solutions
Not applicable
Author

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;

View solution in original post

2 Replies
Not applicable
Author

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...

Not applicable
Author

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;