Forum Discussion
Grouping Time by Hour Intervals
- Anonymous5 years ago
Hi atjt217 ,
Here are the steps you can follow:
1. Create calculated column.
C_CreateIOn = var _1=FORMAT('Table'[CreateIOn],"AM/PM") var _2= IF( 'Table'[CreateIOn Hour]>12, 'Table'[CreateIOn Hour]-12, 'Table'[CreateIOn Hour]) return _2&""&_12. Result:
Best Regards,
Liu Yang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
- Anonymous5 years ago
Hi atjt217 ,
Here are the steps you can follow:
1. Create calculated column.
C_CreateIOn = SWITCH( TRUE(), 'Table'[CreateIOn Hour]>12,'Table'[CreateIOn Hour]-12&""&"PM", 'Table'[CreateIOn Hour]=12,'Table'[CreateIOn Hour]&""&"PM", 'Table'[CreateIOn Hour]<12,'Table'[CreateIOn Hour]&""&"AM")2. Result:
Best Regards,
Liu Yang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
Hi atjt217 ,
Here are the steps you can follow:
1. Create calculated column.
C_CreateIOn =
var _1=FORMAT('Table'[CreateIOn],"AM/PM")
var _2=
IF(
'Table'[CreateIOn Hour]>12,
'Table'[CreateIOn Hour]-12,
'Table'[CreateIOn Hour])
return
_2&""&_1
2. Result:
Best Regards,
Liu Yang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
- atjt2175 years ago
Helper III
Hello Lui,
I tried it out but im getting na error cause FORMAT is not allowed for direct query.