Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I Have a Y axis in a line chart (or bar chart etc...) which is in half hour intervals e.g 9:30, 10:00, 10:30.... with measure values e.g 50, 120,65, 80....I want to compress the x-axis to be 9:00, 10:00, 11,00 etc and the values would be correspondingly 170, 135 etc... is this possible in Sense or do i need to modify source data?
MAny thanks
DEnis
mistake on my part. It's an X axis,
please post a data sample
This is representative data
MPANID | Date | Month | Year | YYYYMM | MonthAbbr | DayofWeek | TimeSlot | DayTime | Value |
1200050328740 | 01/07/2015 | 07 | 2015 | 20157 | Jul | Wed | 00:30 | Wed 00:30 | 46.6 |
1200050328740 | 01/07/2015 | 07 | 2015 | 20157 | Jul | Wed | 01:00 | Wed 01:00 | 44.9 |
1200050328740 | 01/07/2015 | 07 | 2015 | 20157 | Jul | Wed | 01:30 | Wed 01:30 | 44.2 |
1200050328740 | 01/07/2015 | 07 | 2015 | 20157 | Jul | Wed | 02:00 | Wed 02:00 | 40.3 |
1200050328740 | 01/07/2015 | 07 | 2015 | 20157 | Jul | Wed | 02:30 | Wed 02:30 | 29.2 |
1200050328740 | 01/07/2015 | 07 | 2015 | 20157 | Jul | Wed | 03:00 | Wed 03:00 | 23.9 |
1200050328740 | 01/07/2015 | 07 | 2015 | 20157 | Jul | Wed | 03:30 | Wed 03:30 | 24.5 |
1200050328740 | 01/07/2015 | 07 | 2015 | 20157 | Jul | Wed | 04:00 | Wed 04:00 | 23.7 |
Script:
Note: if you want to round down, replace Ceil() with Floor()
LOAD *,time(Ceil(Interval(TimeSlot,'hh:mm'),1/24),'hh:mm') as RoundedTime INLINE [
MPANID,Date,Month,Year,YYYYMM,MonthAbbr,DayofWeek,TimeSlot,DayTime,Value
1200050328740,01/07/2015,07,2015,20157,Jul,Wed,00:30,Wed 00:30,46.6
1200050328740,01/07/2015,07,2015,20157,Jul,Wed,01:00,Wed 01:00,44.9
1200050328740,01/07/2015,07,2015,20157,Jul,Wed,01:30,Wed 01:30,44.2
1200050328740,01/07/2015,07,2015,20157,Jul,Wed,02:00,Wed 02:00,40.3
1200050328740,01/07/2015,07,2015,20157,Jul,Wed,02:30,Wed 02:30,29.2
1200050328740,01/07/2015,07,2015,20157,Jul,Wed,03:00,Wed 03:00,23.9
1200050328740,01/07/2015,07,2015,20157,Jul,Wed,03:30,Wed 03:30,24.5
1200050328740,01/07/2015,07,2015,20157,Jul,Wed,04:00,Wed 04:00,23.7
];
Thanks Vineeth - almost right but on X axis I'm still seeing the half hour slots rather than hour slots.
can you attached sample app! as you can see it's working on the sample data