cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Frequent Visitor

Count on consective hours that contain specific flags

I'm trying find a way to count consective row hours that are greater than two and also contain specfic flags.  So in the table below the count for Parameter C and N would each have a count of 1.  Any help would be greatly appreciated, as I'm not sure if I need to do this in power bi or if I can create a measure.

Kara

 

ParameterDayHourFlag
C1/1/20191 
C1/1/20192 
C1/1/20193m
C1/1/20194 
C1/1/20195m
C1/1/20196 
C1/1/20197 
C1/1/20198m
C1/1/20199m
C1/1/201910 
C1/1/201911 
C1/1/201912 
C1/1/201913 
C1/1/201914 
C1/1/201915 
C1/1/201916 
C1/1/201917m
C1/1/201918m
C1/1/201919m
C1/1/201920 
C1/1/201921 
C1/1/201922 
C1/1/201923 
N1/1/20191 
N1/1/20192 
N1/1/20193m
N1/1/20194 
N1/1/20195m
N1/1/20196 
N1/1/20197 
N1/1/20198m
N1/1/20199m
N1/1/201910 
N1/1/201911 
N1/1/201912 
N1/1/201913 
N1/1/201914 
N1/1/201915 
N1/1/201916 
N1/1/201917m
N1/1/201918m
N1/1/201919m
N1/1/201920 
N1/1/201921 
N1/1/201922 
N1/1/201923 
3 REPLIES 3
Highlighted
Community Support
Community Support

Re: Count on consective hours that contain specific flags

Hi @kararandle2710 ,

I'm a little confused about the result. Can you please share more to us? How can we get the count of 1 per parameters? Do you mean the max consecutive hours(the rows of 17,18, 19 hours for C and N)? Can you please attach a screenshot of your expected result?

 

Best Regards,

Xue Ding

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Best Regards,
Xue Ding
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Highlighted
Frequent Visitor

Re: Count on consective hours that contain specific flags

Thank you for the response. @v-xuding-msft 

 

The hours column is the time of day, so the flag or error would only be considered 1 time if it occurs more than three hours in a row.  We have total hours online but during that time we are looking to find the count of errors to get  the percentage of errors for that day or month.  Does that help?  See below.

 

ParameterDayFlag(Error) CountFlagTotal Numbers onlineError % (Flag Count/Total Numbers online)
C1/1/20191m128%
N1/1/20191m186%
Highlighted
Frequent Visitor

Re: Count on consective hours that contain specific flags

@v-xuding-msftI was wondering if you had an opportunity to look at this again.  Any help would be greatly appreciated.

 

Thank you!

 

Kara

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Upcoming Events

Experience what’s next for Power BI

See the latest Power BI innovations, updates, and demos from the Microsoft Business Applications Launch Event.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Get Ready for Power BI Dev Camp

Get Ready for Power BI Dev Camp

Mark your calendars and join us for our next Power BI Dev Camp!.

Top Solution Authors
Top Kudoed Authors