Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
I am trying to group buckets of minutes into AM and PM categories. Creating the table below gives me the flags I was hoping for but when I try to use this flag as a dimension it is giving me duplicate values for AM and PM. How can I create a distinct dimension grouping for this flag?
LOAD DISTINCT MinuteOfDay,Time(MinuteOfDay,'TT') as AMPMFLAG
RESIDENT MOD;
Hi,
Time(MinuteOfDay,'TT') will only change format of the value, but not the underlying numeric value itself, therefore you see duplicates. However, you can convert it to text, to strip numeric value:
Text(Time(MinuteOfDay,'TT')) as AMPMFLAG
Hope this helps.
Juraj
Hi,
Time(MinuteOfDay,'TT') will only change format of the value, but not the underlying numeric value itself, therefore you see duplicates. However, you can convert it to text, to strip numeric value:
Text(Time(MinuteOfDay,'TT')) as AMPMFLAG
Hope this helps.
Juraj
That did the trick. Thanks much Juraj!