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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
kararandle2710
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
v-xuding-msft
Community Support
Community Support

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.

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%

@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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors