Forum Discussion
Anonymous
4 years agoNot applicable
Median function on a MAX column
Hello, I am trying to calculate the median on a max column (Max_DelaiH). I had to create a max column because I have duplicates. I tried Tmps_Median = VAR __table4 = SUMMARIZE('Documen...
- 4 years ago
Hi Anonymous ,
Please add function CALCULATE() out side the MEDIAN function or MEDIANX(). Like the following expression.
Tmps_Median =VAR __table4 = SUMMARIZE('Documents',[No-QR7],"__value4",[MAX_DelaiH])RETURNIF(HASONEVALUE(Documents[No-QR7]),[MAX_DelaiH],CALCULATE(MEDIAN([__value4]), '__table4'))ORTmps_Median =VAR __table4 = SUMMARIZE('Documents',[No-QR7],"__value4",[MAX_DelaiH])RETURNIF(HASONEVALUE(Documents[No-QR7]),[MAX_DelaiH],MEDIANX(__table4,[__value4]))Best Regards
Community Support Team _ chenwu zhu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
v-chenwuz-msft
4 years agoCommunity Support
Hi Anonymous ,
Please add function CALCULATE() out side the MEDIAN function or MEDIANX(). Like the following expression.
Tmps_Median =
VAR __table4 = SUMMARIZE('Documents',[No-QR7],"__value4",[MAX_DelaiH])
RETURN
IF(HASONEVALUE(Documents[No-QR7]),[MAX_DelaiH],
CALCULATE(MEDIAN([__value4]), '__table4')
)
OR
Tmps_Median =
VAR __table4 = SUMMARIZE('Documents',[No-QR7],"__value4",[MAX_DelaiH])
RETURN
IF(HASONEVALUE(Documents[No-QR7]),[MAX_DelaiH],
MEDIANX(__table4,[__value4])
)
Best Regards
Community Support Team _ chenwu zhu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- Anonymous4 years agoNot applicable
Thank you, I will try it but I realised I didn't need to do it in the end.