Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
Hi @zhang305195102,
You can try to use the following measure formula to calculate the average value based on specific field groups:
formula =
CALCULATE (
AVERAGE ( 'Table'[P_LPP_Out_L(bar)] ),
ALLSELECTED ( 'Table' ),
VALUES ( 'Table'[SN] ),
VALUES ( 'Table'[TP NO.] )
)
Regards,
Xiaoxin Sheng
请问用什么公式可以计算SN(REF-48)在LPP Motor Speed[rpm](120)的时候P_LPP_Out_L[bar]的UCL和LCL,
就是条件1加条件2计算条件3的UCL和LCL
Hi @zhang305195102,
You can modify the allselected part with filter function to add more filter conditions:
formula =
CALCULATE (
AVERAGE ( 'Table'[P_LPP_Out_L(bar)] ),
FILTER ( ALLSELECTED ( 'Table' ), 'Table'[rpm] = 120 ),
VALUES ( 'Table'[SN] ),
VALUES ( 'Table'[TP NO.] )
)
Regards,
Xiaoxin Sheng
您好,非常感谢你的帮助,可能是我没有描述清楚,我想得到结果,用条件1加条件2计算条件3的上限和下限,能在Power Bi 里面进行快速选择出我想知道的SN号零件在120或者830时候多次测试的均值的上限和下限。
Hi @zhang305195102,
You can try to use the following measure formula to calculate the average value based on specific field groups:
formula =
CALCULATE (
AVERAGE ( 'Table'[P_LPP_Out_L(bar)] ),
ALLSELECTED ( 'Table' ),
VALUES ( 'Table'[SN] ),
VALUES ( 'Table'[TP NO.] )
)
Regards,
Xiaoxin Sheng
您好 首先感谢您的帮忙, 我使用了您告诉我的公式,但是没有没有得到我想要的结果,可能是我没有描述清楚或者是我描述错误,用了您的公式计算出来的3个编号的样件结果是一样的,这个我不知道是不是我公式输入错误照成的,请问您有其他的公式吗?
Hi @zhang305195102,
In fact, my formula is measure expression. You can't directly use in calculated column or their row context will be fixed to get wrong result. If you are looking for calculated column version, you can take a look at the below formulas:
formula =
CALCULATE (
AVERAGE ( 'Table'[P_LPP_Out_L(bar)] ),
FILTER (
'Table',
'Table'[rpm] IN { 120, 830 }
&& 'Table'[SN] = EARLIER ( 'Table'[SN] )
&& 'Table'[TP NO.] = EARLIER ( 'Table'[TP NO.] )
)
)
Here are some blog links about row context and difference between calculated column and measure, you can take a look on them if they helps:
Row Context and Filter Context in DAX - SQLBI
Calculated Columns and Measures in DAX - SQLBI
Regards,
Xiaoxin Sheng
User | Count |
---|---|
57 | |
22 | |
21 | |
19 | |
16 |
User | Count |
---|---|
86 | |
84 | |
52 | |
37 | |
23 |