Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Viewers,
Good morning!
I need a clarification,
Sum({<year={2015},month={'May'},day={'Sun'}>}sales)
But how do we analyse total sales based on timestamp
Suppose we have timestamp 6:00pm for Sunday
Pls help me on this.
You can create fields for hour, minute, second from a timestamp field just like you can create day, month, week, year, etc. from a date:
Set TimestampFormat = 'MM/DD/YYYY hh:mm TT'; // Adjust to your timestamp format code!
LOAD
TimeStampField,
Hour(TimeStampField) AS Hour, // will return value between 0 and 23
Minute(TimeStampField) AS Minute, // will return value between 0 and 59
WeekDay(TimeStampField) as WeekDay,
....
FROM ....;
Then in your set expression:
=Sum({<Hour = {18}, WeekDay = {'Sun'} >} sales)