Forum Discussion

nehajadhav166's avatar
nehajadhav166
Icon for Resolver I rankResolver I
4 years ago
Solved

Cpk calculation difference between power BI and matlab

Hello Experts,

 

In my dashboard I am calculating Cpk values for different charactertsic.

Formula I use is as below:

VAR sigma = STDEV.S(Process[MeasureValue])
VAR estimatedMean = AVERAGE(Process[MeasureValue])
VAR Cplower = (estimatedMean-MIN(Process[LimitLower]))/(3*sigma)
VAR Cpupper = (MAX(Process[LimitUpper])-estimatedMean)/(3*sigma)
RETURN MIN(Cplower,Cpupper)
 
When I calculate Cpk with same set of values in matlab, there is difference in values, eq matlab value is 37.77 and power bi 39.89.
Can you please guide me if I am doing something wrongly in power BI?
 
Thanks in advance.
 
Regards,
Neha
  • Anonymous's avatar
    Anonymous
    4 years ago

    Hi nehajadhav166 ,

     

    You cannot put the defined variables into the min function.

    It only supports column or expressions.

    You can split the two variables, create separate measures for them to be calculated, and then use the min function to compare them.

     

    Best regards,

    Community Support Team Selina zhu

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

     

5 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi nehajadhav166 ,

     

    You cannot put the defined variables into the min function.

    It only supports column or expressions.

    You can split the two variables, create separate measures for them to be calculated, and then use the min function to compare them.

     

    Best regards,

    Community Support Team Selina zhu

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

     

    • nehajadhav166's avatar
      nehajadhav166
      Icon for Resolver I rankResolver I

      Anonymous ,

       

      Process[LimitLower]/Process[LimitUpper] both are columns in table.

      Do I have to still change and create measure for this?

       

      Thanks,

      Neha

      • Anonymous's avatar
        Anonymous
        Not applicable

        Hi nehajadhav166 ,

        If you want to give calculations for them, it is necessary to create MEASURES.
        What I mean is that you can split the process of finding the value of these two into two MEASURES

        One measure to calculate Cplower and the other to calculate Cpupper. And then create the third measure to compare the two value.

         

        Please let me know if you have any further questions,thanks in advance~

         

        Best regards,

        Community Support Team Selina zhu

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

         

         

         

    • Anonymous's avatar
      Anonymous
      Not applicable

      How do I do this if all of my UCL, LCL and Central line values are all measures, and not columns?