Forum Discussion
Sandeep13
3 years agoHelper III
Rank function Based on ReportedDate like YYYYMM
Hi All, I have 2 columns reporting_mth and Amount, I want to create rank based on reporting_mth and sort data based on amount. Now If you see i have 202203 and 202212 in my data. I am expecti...
Anonymous
3 years agoNot applicable
Hi Sandeep13
You can create a measure
Measure = var a=LEFT(SELECTEDVALUE('Table'[reporting_mth]),4)
return RANKX(FILTER(ALLSELECTED('Table'),LEFT([reporting_mth],4)=a),CALCULATE(SUM('Table'[Outstanding Amount])),,DESC,Dense)
Best Regards!
Yolo Zhu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.