Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all,
Is it possible to add dates in inline load.
For ex: I have a inline load script like below, i need to add a date next to the names is it possible?
Newdims:
INLINE [ Emails
Invitation Email (Every Tuesday's Date)
Reminder1 (signups) (Every Thursday's Date)
Reminder1 (non signups) (Every Thursday's Date)
Reminder1
Reminder2 (signups) (Every Friday's Date)
Reminder2 (non signups) (Every Friday's Date)
Reminder2
Final Reminder (signups) (Every Saturday's Date)
Final Reminder (non signups) (Every Saturday's Date)
Final Reminder
Totals
];
I am using the above Inline script in table as column, I need to display the date of email sent, i used the date() but it is not working.
Is any way?
regards,
Pramod
Hi,
Try this script
LET vEveryTuesday = Date(WeekStart(Today()) + 1);
LET vEveryThursday = Date(WeekStart(Today()) + 3);
LET vEveryFriday = Date(WeekStart(Today()) + 4);
LET vEverySaturday = Date(WeekStart(Today()) + 5);
LOAD
Replace(Emails, Chr(39), '') AS Emails
INLINE [ Emails
Invitation Email '$(vEveryTuesday)'
Reminder1 (signups) '$(vEveryThursday)'
Reminder1 (non signups) '$(vEveryThursday)'
Reminder1
Reminder2 (signups) '$(vEveryFriday)'
Reminder2 (non signups) '$(vEveryFriday)'
Reminder2
Final Reminder (signups) $(vEverySaturday)
Final Reminder (non signups) $(vEverySaturday)
Final Reminder
Totals
];
Regards,
Jagan.
Hi,
The data which you are loading in Inline is not the transactional data. It is a text, and thus your date function will not work on that.
Kindly share what transaction data columns you have
Regards,
Kaushik Solanki
v = Floor(Today());
NewDims:
load Emails&date($(v)) as Email;
LOAD * INLINE [
Emails
Invitation Email
Reminder1 (signups)
Reminder1 (non signups)
Reminder1
Reminder2 (signups)
Reminder2 (non signups)
Reminder2
Final Reminder (signups)
Final Reminder (non signups)
Final Reminder
Totals
];
You need to move the Today() out of the inline portion.Like this:
NewDims:
LOAD Emails & If(Wildmatch(Emails, '*signups*'), ' ' & Today()) As Emails
INLINE
[
Emails
Invitation Email
Reminder1 (signups)
Reminder1 (non signups)
Reminder1
Reminder2 (signups)
Reminder2 (non signups)
Reminder2
Final Reminder (signups)
Final Reminder (non signups)
Final Reminder
Totals
];
Thanks a lot jonathan.
I have one more requirement that is can i add different dates instead of today()?
for example : Invitation Email- we will send it on Monday so can i have a date of Monday?
and Reminder1 (signups) on Wednesday so date of Wednesday?
And Every week it should change the date.
And I am Using those Inline values in table as dimensions and matching in measures to have table values like below,
IF(match(Emails , 'Invitation Email'),Only({$<expiration_date = {"$(=date(max({$<batch_meta_data_id={23}>}expiration_date)-7))"},
campaign_group_id={'2'},batch_meta_data_id={'23'},email_type_id = {'44'}>}sent),
IF(match(Emails , 'Reminder1 (signups)'),Only({$<expiration_date = {"$(=date(max({$<batch_meta_data_id={23}>}expiration_date)-7))"},
campaign_group_id={'2'},batch_meta_data_id={'23'},email_type_id = {'2'}>}sent),
IF(match(Emails , 'Reminder1 (non signups)'),Only({$<expiration_date = {"$(=date(max({$<batch_meta_data_id={23}>}expiration_date)-7))"},
campaign_group_id={'2'},batch_meta_data_id={'23'},email_type_id = {'45'}>}sent)
But after using with date this is not matching and values disappeared how can i get back values and also the date in column
Hi,
Try like this
LET vToday = date(today());
NewDims:
LOAD Replace(Emails, chr(39), '') AS Emails
INLINE [ Emails
Invitation Email
Reminder1 (signups) '$(vToday)'
Reminder1 (non signups) '$(vToday)'
Reminder1
Reminder2 (signups) '$(vToday)'
Reminder2 (non signups) '$(vToday)'
Reminder2
Final Reminder (signups) '$(vToday)'
Final Reminder (non signups) '$(vToday)'
Final Reminder
Totals
];
$(vScript);
Regards,
Jagan.
Do you mean that Invitation Emails should be sent only on Monday and on every Monday?
Should the date always be a future date (ie the next Monday)?
Thanks for the reply jagan,
I need different dates for each type.
For example:
INLINE [ Emails
Invitation Email (Every Tuesday's Date)
Reminder1 (signups) (Every Thursday's Date)
Reminder1 (non signups) (Every Thursday's Date)
Reminder1
Reminder2 (signups) (Every Friday's Date)
Reminder2 (non signups) (Every Friday's Date)
Reminder2
Final Reminder (signups) (Every Saturday's Date)
Final Reminder (non signups) (Every Saturday's Date)
Final Reminder
Totals
];
And I am Using those Inline values in table as dimensions and matching in measures to have table values like below,
IF(match(Emails , 'Invitation Email'),Only({$<expiration_date = {"$(=date(max({$<batch_meta_data_id={23}>}expiration_date)-7))"},
campaign_group_id={'2'},batch_meta_data_id={'23'},email_type_id = {'44'}>}sent),
IF(match(Emails , 'Reminder1 (signups)'),Only({$<expiration_date = {"$(=date(max({$<batch_meta_data_id={23}>}expiration_date)-7))"},
campaign_group_id={'2'},batch_meta_data_id={'23'},email_type_id = {'2'}>}sent),
IF(match(Emails , 'Reminder1 (non signups)'),Only({$<expiration_date = {"$(=date(max({$<batch_meta_data_id={23}>}expiration_date)-7))"},
campaign_group_id={'2'},batch_meta_data_id={'23'},email_type_id = {'45'}>}sent)
But after using with date this is not matching and values disappeared how can i get back values and also the date in column
Hi,
Try this script
LET vEveryTuesday = Date(WeekStart(Today()) + 1);
LET vEveryThursday = Date(WeekStart(Today()) + 3);
LET vEveryFriday = Date(WeekStart(Today()) + 4);
LET vEverySaturday = Date(WeekStart(Today()) + 5);
LOAD
Replace(Emails, Chr(39), '') AS Emails
INLINE [ Emails
Invitation Email '$(vEveryTuesday)'
Reminder1 (signups) '$(vEveryThursday)'
Reminder1 (non signups) '$(vEveryThursday)'
Reminder1
Reminder2 (signups) '$(vEveryFriday)'
Reminder2 (non signups) '$(vEveryFriday)'
Reminder2
Final Reminder (signups) $(vEverySaturday)
Final Reminder (non signups) $(vEverySaturday)
Final Reminder
Totals
];
Regards,
Jagan.
Thanks a lot jagan