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

July 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more

Reply
LR
Frequent Visitor

Dynamically calculating consecutive data 'n' points

 

Hi Team,

I study the variability of a production system. So I am trying to plot Statistical Process Charts in Power BI. This SPC charts are guided by some rules and I have to set up Nelson's eighth rule. This rule sais that "if 8 consecutive points are outside the range, then the data is out of control". The range of value is [ avg - stdev ; avg + stdev ].

On the picture you can see an exemple of this rule and the graph represents data :

 

 

Nelson8.jpg

 

ExempleNelson8.jpg

 

Data change dynamically on the filter selection and are order by date and a type on the graph.
I didn't have any problem to build the interval with DAX formula. But I don't know how to compare values ​​at this range.

So my question is, how do you calculate a new measure that can find 'n' (can it be 1, 2, ..., 10) consecutives points that are outside this range?

I would like to indicate these values ​​on the graph above, and then count the number of times the rule is broken (ie the number of times or n consecutive points are out of range).

Please, could you help me to calculate a such DAX formula ?
Thanks.

1 ACCEPTED SOLUTION
v-chuncz-msft
Community Support
Community Support

@LR,

 

You may check if the following post helps.

https://community.powerbi.com/t5/Desktop/Find-min-date-where-continuous-8-rows-of-data-in-the-calcul...

Community Support Team _ Sam Zha
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
v-chuncz-msft
Community Support
Community Support

@LR,

 

You may check if the following post helps.

https://community.powerbi.com/t5/Desktop/Find-min-date-where-continuous-8-rows-of-data-in-the-calcul...

Community Support Team _ Sam Zha
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hi @v-chuncz-msft,

Thank you very much for your answer !
I missed this piece of reflection to succeed !

Thanks again

LR

Helpful resources

Announcements
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

60 days of Data Days Carousel

Data Days 2026

Join Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Top Solution Authors