Forum Discussion
Calculating Median on Measure
- 5 years ago
Thank you all very much I ended up doing the following
Created my 5 measure of last 5 months (As i needed 5 months count to calculate median)
One = calculate (COUNT(ClaimsConvertedData[CustID]), DATESINPERIOD ( ClaimsConvertedData[PROCDATE], EOMONTH ( MAX ( ClaimsConvertedData[PROCDATE] ), -1 ), -1, MONTH ),FILTER(ClaimsConvertedData,ClaimsConvertedData[T&C Identifier]="Y"))Two = calculate (COUNT(ClaimsConvertedData[CustID]), DATESINPERIOD ( ClaimsConvertedData[PROCDATE], EOMONTH ( MAX ( ClaimsConvertedData[PROCDATE] ), -2 ), -1, MONTH ),FILTER(ClaimsConvertedData,ClaimsConvertedData[T&C Identifier]="Y"))and so on.
The following is the measure that returns the median.
median = MEDIANX( Union( ROW("Measure", "Measure 1", "Measure Value",[One]), ROW("Measure", "Measure 2", "Measure Value",[Two]), ROW("Measure", "Measure 3", "Measure Value",[Three]), ROW("Measure", "Measure 4", "Measure Value",[Four]), ROW("Measure", "Measure 5", "Measure Value",[Five]) ),[Measure Value])
https://drive.google.com/file/d/1oGP4EIHSlV2kDo7SDXMDTCfrQ8lYIYlF/view?usp=sharing
@vivran22 please find the attached samle file. As I explained before For October count I want to calculate count for July, August and september which should be 696,440 and 452 and then calculate the median of them which should be 452. Greatly appriciate your help.
Thank you.
mukhan169 I have sent you access request for the file.
Cheers!
Vivek
Blog: vivran.in/my-blog
Connect on LinkedIn
Follow on Twitter
- mukhan1695 years ago
Helper III
https://drive.google.com/file/d/1oGP4EIHSlV2kDo7SDXMDTCfrQ8lYIYlF/view?usp=sharing
@vivran22 I did not receive the request this is the link for the google drive which should be accessiable . If it is not could you please let me know how to give you access?
- mukhan1695 years ago
Helper III