Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Anonymous
Not applicable

Calculate average in certain timeperiod while looking for value above a number

Hi,

 

I'm trying to calculate the average of a column1 after binary column2 is 1. After that column2 turns 1, the column2 will roughly 30 minutes later increase its value from about 5 to about 10 for 6 hours. I need to calculate the average of that six hour window after the value has increased. This can happen multiple times in my dataset and I would like to find a way to identify each occurrence and see the average of each of them.

Does anyone have any good ideas on how to go about this?

 

Datetimevolbinary
26.10.2019 00:104.20
26.10.2019 00:202.30
26.10.2019 00:304.50
26.10.2019 00:404.60
26.10.2019 00:5050
26.10.2019 01:005.290
26.10.2019 01:105.680
26.10.2019 01:204.340
26.10.2019 01:304.320
26.10.2019 01:404.30
26.10.2019 01:504.280
26.10.2019 02:004.261
26.10.2019 02:104.551
26.10.2019 02:204.551
26.10.2019 02:304.551
26.10.2019 02:409.21
26.10.2019 02:50101
26.10.2019 03:00101
26.10.2019 03:10101
26.10.2019 03:20101
26.10.2019 03:30101
26.10.2019 03:40101
26.10.2019 03:50101
26.10.2019 04:00101
26.10.2019 04:10101
26.10.2019 04:20101
26.10.2019 04:30101
26.10.2019 04:40101
26.10.2019 04:50101
26.10.2019 05:00101
26.10.2019 05:10101
26.10.2019 05:20101
26.10.2019 05:30101
26.10.2019 05:40101
26.10.2019 05:50101
26.10.2019 06:00101
26.10.2019 06:10101
26.10.2019 06:20101
26.10.2019 06:30101
26.10.2019 06:40101
26.10.2019 06:50101
26.10.2019 07:00101
26.10.2019 07:10101
26.10.2019 07:20101
26.10.2019 07:30101
26.10.2019 07:40101
26.10.2019 07:50101
26.10.2019 08:00101
26.10.2019 08:10101
26.10.2019 08:209.891
26.10.2019 08:30101
26.10.2019 08:40101
26.10.2019 08:504.340
26.10.2019 09:004.980
26.10.2019 09:104.960
26.10.2019 09:204.940
26.10.2019 09:304.920
26.10.2019 09:404.90
26.10.2019 09:504.880
26.10.2019 10:004.860
26.10.2019 10:104.840
26.10.2019 10:204.820
26.10.2019 10:304.80
26.10.2019 10:404.780
26.10.2019 10:504.760
26.10.2019 11:004.740
26.10.2019 12:004.720
26.10.2019 12:104.730
26.10.2019 12:204.740
26.10.2019 12:304.750
26.10.2019 12:404.760
26.10.2019 12:504.770
26.10.2019 13:004.780
26.10.2019 13:104.790
26.10.2019 13:204.80
26.10.2019 13:304.811
26.10.2019 13:404.81
26.10.2019 13:504.791
26.10.2019 14:004.781
26.10.2019 14:109.891
26.10.2019 14:209.91
26.10.2019 14:309.911
26.10.2019 14:409.921
26.10.2019 14:509.931
26.10.2019 15:009.941
26.10.2019 15:109.951
26.10.2019 15:209.961
26.10.2019 15:309.971
26.10.2019 15:409.981
26.10.2019 15:509.991
26.10.2019 16:00101
26.10.2019 16:1010.011
26.10.2019 16:2010.021
26.10.2019 16:3010.031
26.10.2019 16:4010.041
26.10.2019 16:5010.051
26.10.2019 17:0010.061
26.10.2019 17:1010.071
26.10.2019 17:2010.081
26.10.2019 17:3010.091
26.10.2019 17:4010.11
26.10.2019 17:5010.111
26.10.2019 18:0010.121
26.10.2019 18:1010.131
26.10.2019 18:2010.141
26.10.2019 18:3010.151
26.10.2019 18:4010.161
26.10.2019 18:5010.171
26.10.2019 19:0010.181
26.10.2019 19:1010.191
26.10.2019 19:2010.21
26.10.2019 19:3010.211
26.10.2019 19:4010.221
26.10.2019 19:5010.231
26.10.2019 20:0010.241
26.10.2019 20:1010.251
26.10.2019 20:204.650
26.10.2019 20:304.660
26.10.2019 20:404.670
26.10.2019 20:504.680
26.10.2019 21:004.690
26.10.2019 21:104.70
26.10.2019 21:204.710
26.10.2019 21:304.720
26.10.2019 21:404.730
26.10.2019 21:504.740
26.10.2019 22:004.750
26.10.2019 22:104.760
26.10.2019 22:204.770
26.10.2019 22:304.780
26.10.2019 22:404.790
26.10.2019 22:504.80
26.10.2019 23:004.810
26.10.2019 23:104.820
26.10.2019 23:204.830
26.10.2019 23:304.840
26.10.2019 23:404.850
26.10.2019 23:504.860

 

 
2 REPLIES 2
AlB
Community Champion
Community Champion

Hi @Anonymous 

Can you please:

1.  Show the sample data in text-tabular format instead of on a pic, s that it can be copied?

2. Show the expected result and how you would like to present it (in a visual, in an additional calculated column in the original table)?

 

Please always show your sample data in text-tabular format in addition to (or instead of) the screen captures. A screen cap doesn't allow people to readily copy the data and run a quick test and thus decreases the likelihood of your question being answered. Just use 'Copy table' in Power BI and paste it here. Or, ideally, share the pbix (beware of confidential data).

 

Please mark the question solved when done and consider giving kudos if posts are helpful.

Cheers  Datanaut

Anonymous
Not applicable

Sorry, fixed now

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.