Binning data by time problem

cme263

New Member
Joined
Mar 12, 2012
Messages
15
Dynamic Segmentation and Dynamic Range … problem for the timedimension.<o:p></o:p>
I have a pile of log data from a variety of sources from adatabase. There are multiple column of identifiers, followed by a few columnsof various data, with the last column being a complete year to second Time Stamp.All data is only reported every 5 minutes, so all data is reported on the hourand every 5 minutes of the hour at 00 seconds. The next 4 columns, Date, Time,Hour and Min are derived. I am looking for the DAX formula (see below forframework that is not working!) that will create the selectable Time Resolutionreporting of various calculated functions on other data columns. The last 2columns are internal examples of the expected data per the selected timeresolution. <o:p></o:p>
Let’s call thistable “Report”<o:p></o:p>
ID1<o:p></o:p>
ID2<o:p></o:p>
ID3<o:p></o:p>
…<o:p></o:p>
Data1<o:p></o:p>
Data2<o:p></o:p>
…<o:p></o:p>
Time Stamp<o:p></o:p>
Date<o:p></o:p>
Time<o:p></o:p>
Hour<o:p></o:p>
Minute<o:p></o:p>

Data1_for _10min_ resolution<o:p></o:p>

Data1_for _15min_ resolution<o:p></o:p>
East<o:p></o:p>
Lab3<o:p></o:p>
X<o:p></o:p>
<o:p></o:p>
3<o:p></o:p>
300<o:p></o:p>
<o:p></o:p>
10/28/2016 10:00<o:p></o:p>
10/28/2016<o:p></o:p>
10:00<o:p></o:p>
10<o:p></o:p>
0<o:p></o:p>

4<o:p></o:p>

6<o:p></o:p>
East<o:p></o:p>
Lab3<o:p></o:p>
X<o:p></o:p>
<o:p></o:p>
1<o:p></o:p>
300<o:p></o:p>
<o:p></o:p>
10/28/2016 10:05<o:p></o:p>
10/28/2016<o:p></o:p>
10:05<o:p></o:p>
10<o:p></o:p>
5<o:p></o:p>

<o:p></o:p>​

<o:p></o:p>​
East<o:p></o:p>
Lab3<o:p></o:p>
X<o:p></o:p>
<o:p></o:p>
2<o:p></o:p>
300<o:p></o:p>
<o:p></o:p>
10/28/2016 10:10<o:p></o:p>
10/28/2016<o:p></o:p>
10:10<o:p></o:p>
10<o:p></o:p>
10<o:p></o:p>

2<o:p></o:p>

<o:p></o:p>​
East<o:p></o:p>
Lab3<o:p></o:p>
X<o:p></o:p>
<o:p></o:p>
0<o:p></o:p>
300<o:p></o:p>
<o:p></o:p>
10/28/2016 10:15<o:p></o:p>
10/28/2016<o:p></o:p>
10:15<o:p></o:p>
10<o:p></o:p>
15<o:p></o:p>

<o:p></o:p>​

0<o:p></o:p>
East<o:p></o:p>
Lab3<o:p></o:p>
X<o:p></o:p>
<o:p></o:p>
0<o:p></o:p>
300<o:p></o:p>
<o:p></o:p>
10/28/2016 10:20<o:p></o:p>
10/28/2016<o:p></o:p>
10:20<o:p></o:p>
10<o:p></o:p>
20<o:p></o:p>

0<o:p></o:p>

<o:p></o:p>​
East<o:p></o:p>
Lab3<o:p></o:p>
X<o:p></o:p>
<o:p></o:p>
0<o:p></o:p>
300<o:p></o:p>
<o:p></o:p>
10/28/2016 10:25<o:p></o:p>
10/28/2016<o:p></o:p>
10:25<o:p></o:p>
10<o:p></o:p>
25<o:p></o:p>

<o:p></o:p>​

<o:p></o:p>​

<tbody>
</tbody>
<o:p></o:p>
I have created a table “res_bin”. This table is my sourcethe resolution time and time binning ranges within the hour (for the Minute). <o:p></o:p>
index<o:p></o:p>
resol<o:p></o:p>
time<o:p></o:p>
low<o:p></o:p>
high<o:p></o:p>
1<o:p></o:p>
60<o:p></o:p>
0<o:p></o:p>
0<o:p></o:p>
60<o:p></o:p>
2<o:p></o:p>
30<o:p></o:p>
0<o:p></o:p>
0<o:p></o:p>
30<o:p></o:p>
3<o:p></o:p>
30<o:p></o:p>
30<o:p></o:p>
30<o:p></o:p>
60<o:p></o:p>
4<o:p></o:p>
15<o:p></o:p>
0<o:p></o:p>
0<o:p></o:p>
15<o:p></o:p>
5<o:p></o:p>
15<o:p></o:p>
15<o:p></o:p>
15<o:p></o:p>
30<o:p></o:p>
6<o:p></o:p>
15<o:p></o:p>
30<o:p></o:p>
30<o:p></o:p>
45<o:p></o:p>
7<o:p></o:p>
15<o:p></o:p>
45<o:p></o:p>
45<o:p></o:p>
60<o:p></o:p>
…<o:p></o:p>
<o:p></o:p>
<o:p></o:p>
<o:p></o:p>
<o:p></o:p>

<tbody>
</tbody>
<o:p></o:p>
Again, I am trying to group Data by binning the reporting Timeby a resolution time. I get an error, as soon as I try to reference the res_bin[resol].I am clearly having a filter issue. What am I not getting? Thanks in advance.
Data1SumbyTimeResolution:=<o:p></o:p>
IF (<o:p></o:p>
ISFILTERED ( res_bin[resol]),<o:p></o:p>
IF (<o:p></o:p>
HASONEVALUE(res_bin[resol] ),<o:p></o:p>
CALCULATE (<o:p></o:p>
[Sum(Data1)],<o:p></o:p>
FILTER(<o:p></o:p>
VALUES ( Report[Data1] ),<o:p></o:p>
[Minute]>= VALUES ( res_bin[low] ) &&[Minute] < VALUES ( res_bin[high] )<o:p></o:p>
)<o:p></o:p>
),<o:p></o:p>
BLANK ()<o:p></o:p>
),<o:p></o:p>
[Sum(Data1)]<o:p></o:p>
)<o:p></o:p>
<o:p></o:p>
<o:p></o:p>
<o:p></o:p>
 

Excel Facts

Using Function Arguments with nested formulas
If writing INDEX in Func. Arguments, type MATCH(. Use the mouse to click inside MATCH in the formula bar. Dialog switches to MATCH.

Forum statistics

Threads
1,214,979
Messages
6,122,561
Members
449,089
Latest member
Motoracer88

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top