Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Everyone
i have a datasource in that data i want to flag dates where system are on peak ( between 24 & 4) and off-peak ( between 5 & 23) so i want to flag them for every month . please help
thank you in advance
Try this?
Load *,
If(Day(dates) >= 4 and Day(dates) <= 24, 'on peak', If(Day(dates) >= 5 and Day(dates) <= 23, 'off-peak')) as FieldName
Group By dates;
Try this?
Load *,
If(Day(dates) >= 4 and Day(dates) <= 24, 'on peak', If(Day(dates) >= 5 and Day(dates) <= 23, 'off-peak')) as FieldName
Group By dates;
Can you please elaborate?
Group By might not be required, right?
May be, But the reason i state the Group By here is recently i've faced issue with Unique dates so then i thought to use..
But without any aggregation function 'group by' would throw error.
Again true, I feel it like using Aggregation only. thanks your prompt