Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
I'm trying to figure out how to use log in date as a dimension to show weekly trends. I'm currently displaying it by week #, but i'm trying to figure out way to display a week range of the last 7 days.
This is what i'm currently using, but I would prefer the actual date range to show.
=if(week( LOGIN_DATE)<=8, week( LOGIN_DATE))
Thanks
I guess you used your actual field names, i.e. something like:
Dual(WeekStart(LOGIN_DATE)&' - '&WeekEnd(LOGIN_DATE),WeekStart(LOGIN_DATE))
if this doesn't work, can you please post some sample of your application that shows this behaviour?
Preparing examples for Upload - Reduction and Data Scrambling
thanks
regards
Marco
Hi,
I guess you are looking for a calculated dimenstion like:
Dual(WeekStart(Date)&' - '&WeekEnd(Date),WeekStart(Date))
Due to performance reasons it might be better to calculate the week as a new field in the script:
LOAD *,
Week(Date) as Week,
Dual(WeekStart(Date)&' - '&WeekEnd(Date),WeekStart(Date)) as WeekName;
LOAD Date(MakeDate(2017)+RecNo()-1) as Date,
Ceil(Rand()*100) as SomeFact
AutoGenerate 365;
hope this helps
regards
Marco
Hi Marco, your graph is showing exactly how I need it to, but the dimension didn't work for me. I tried loading using the script you provided, but would I then just use week as a dimension? if so, that didn't work either
I guess you used your actual field names, i.e. something like:
Dual(WeekStart(LOGIN_DATE)&' - '&WeekEnd(LOGIN_DATE),WeekStart(LOGIN_DATE))
if this doesn't work, can you please post some sample of your application that shows this behaviour?
Preparing examples for Upload - Reduction and Data Scrambling
thanks
regards
Marco
that worked, thank you!
you're welcome
regards
Marco