Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi ,
My requirement is to display the working hours which is 8: 00 am --- 17:00 pm in the bar chart.
I have used the expression =Hour(Timestamp(MyHour)) this is displaying all the hours in a day.
Can anyone help please.
thanks,
vamsi.
You could create a field WorkingHours in the script based on your MyHour field and then use that new field as dimension in your chart
MyData:
LOAD
*,
If(Hour>=8 and Hour<=17, Hour) as WorkingHour
;
LOAD
...fields...,
MyHour,
Floor(Frac(MyHour)*24) as Hour,
...other fields...
FROM
...sourcedata...
;
You could create a field WorkingHours in the script based on your MyHour field and then use that new field as dimension in your chart
MyData:
LOAD
*,
If(Hour>=8 and Hour<=17, Hour) as WorkingHour
;
LOAD
...fields...,
MyHour,
Floor(Frac(MyHour)*24) as Hour,
...other fields...
FROM
...sourcedata...
;
You can use like below, Remind please calculate Hours in 24 Hours format..
If Dimension
If(Hours >= 8 and Hours <= 17, Hours)
If Expression
Sum({<Hours = {">=8 <=17"}>} Measure)
Hi,
I was using this
if(timestamp(floor(created_at)>=8 and floor(created_at) <=17,created_at )+ Maketime(hour(created_at)), 'hh:mm') as MyHour,
I was getting this.
What am i doing wrong here?
Hi,
i have got it now
I have used the this in the dimension
=IF(Hour(Interval(created_at,'hh')) >= 8 AND Hour(Interval(created_at,'hh')) <=17, Hour(Interval(created_at,'hh')))
Thanks for helping me,