Forum Discussion
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
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.
2 Replies
- v-chenwuz-msftCommunity 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])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.
- AnonymousNot applicable
Thank you, I will try it but I realised I didn't need to do it in the end.