cancel
Showing results for
Did you mean:

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Helper IV

Cpk DAX

Hi,

Need help to write DAX to calculate Cpk

Cpk formula

Sample data

current dax

```Xbar = AVERAGE(Table[MeasureValue])
STDEV = STDEV.S(TableMeasureValue])```

Abbreviations

USL= Limit Upper

LSL= Limit Lower

STDEV= sigma

1 ACCEPTED SOLUTION
Super User

Not entirely sure how you are using this, but perhaps something like:

```Cpk =
VAR CpU = (MAX([LimitUpper]) - [Xbar])/3*[STDEV]
VAR CpL = ([Xbar] - MAX([LimitLower]))/3*[STDEV]
RETURN MIN(CpU,CpL)```

Become an expert!: Enterprise DNA
External Tools: MSHGQM
Latest book!:
Power BI Cookbook Third Edition (Color)

DAX is easy, CALCULATE makes DAX hard...
4 REPLIES 4
Super User

Not entirely sure how you are using this, but perhaps something like:

```Cpk =
VAR CpU = (MAX([LimitUpper]) - [Xbar])/3*[STDEV]
VAR CpL = ([Xbar] - MAX([LimitLower]))/3*[STDEV]
RETURN MIN(CpU,CpL)```

Become an expert!: Enterprise DNA
External Tools: MSHGQM
Latest book!:
Power BI Cookbook Third Edition (Color)

DAX is easy, CALCULATE makes DAX hard...
Helper IV

Awesome and thanks alot.

PS. added a "( )" for ( 3*[STDEV] )

```Cpk =
VAR CpU = (MAX([LimitUpper]) - [Xbar])/(3*[STDEV])
VAR CpL = ([Xbar] - MAX([LimitLower]))/(3*[STDEV])
RETURN MIN(CpU;CpL)```
Super User

@vincentakatoh- I created a Quick Measure page for these kinds of process measures if you need any others or if you want to check that I didn't make any other mistakes!

https://community.powerbi.com/t5/Quick-Measures-Gallery/Process-Improvement-Measures-Cp-Cplower-Cpup...

Become an expert!: Enterprise DNA
External Tools: MSHGQM
Latest book!:
Power BI Cookbook Third Edition (Color)

DAX is easy, CALCULATE makes DAX hard...
Super User

Yeah, I actually added those too after my post I was looking at the formulas and thinking, hmmm...I think it needs some parens... 🙂

Become an expert!: Enterprise DNA
External Tools: MSHGQM
Latest book!:
Power BI Cookbook Third Edition (Color)

DAX is easy, CALCULATE makes DAX hard...

Announcements

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.