Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
srajeshnkl
Regular Visitor

Power BI : Rank based on date Month wise

Hi Folks,

 

I have a table with below columns,  (Represents data of idea implementation)

 

S.No

Name

Idea Name

Implemented Date

 

The data is for whole year. I want to give Rank to the persons based on the "Implemented Date" for each month.Person implements a idea first on that month will get Rank 1. For example if Person X implements idea on 1-Jan-2017 then X gets rank 1 on January the same way if Person Y implements idea on 1-Feb-2017 then Y gets rank 1 on month Febrary . In this way I want to give rank for all persons on each month. How can I use RankX function in power BI to achieve this?

 

Please help me.

 

Below is the example data and Rank should be automatically calculated for each month like below

 

S.NoName Implemented dateRank
4Suganya1-Jan-171
5Vanitha2-Jan-172
6Sangeetha4-Jan-173
8Ravikumar8-Jan-174
1Sathish12-Jan-175
3Visagan13-Jan-176
9Ramesh19-Jan-177
2Rajesh22-Jan-178
10Harini25-Jan-179
7Sahana31-Jan-1710
12Rajesh1-Feb-171
16Sangeetha1-Feb-171
18Ravikumar1-Feb-171
13Visagan15-Feb-174
19Ramesh15-Feb-174
11Sathish18-Feb-176
14Suganya18-Feb-176
17Sahana18-Feb-176
20Harini18-Feb-176
15Vanitha21-Feb-1710


Regards, 

Rajesh S

2 ACCEPTED SOLUTIONS

Hi @srajeshnkl

 

You could try adding the following two calcuated columns

 

MonthID = FORMAT('Table3'[Implemented date],"YYYYMM")
Month = FORMAT(DATE(
            YEAR('Table3'[Implemented date]),
            MONTH('Table3'[Implemented date]),
            1),"MMM YY")

Make sure you hide MonthID and set Month to be sorted by MonthID

 

Then just drag the new Month column to the Column of a Matrix

 

ranky.png

 

 

 


To learn more about DAX visit : aka.ms/practicalDAX

Proud to be a Datanaut!

View solution in original post

Hi @srajeshnkl,

 

Have you tried the solution provided by @Phil_Seamark above? Does it work in your scenario? If it works, could you accept it as solution to close this thread?

 

If you still have any question on this issue, feel free to post here. Smiley Happy

 

Regards

View solution in original post

6 REPLIES 6
Phil_Seamark
Microsoft Employee
Microsoft Employee

Hi @srajeshnkl

 

Any chance you can post some dummy data including what it should look like with the RANK based measure.


To learn more about DAX visit : aka.ms/practicalDAX

Proud to be a Datanaut!

Hi @Phil_Seamark

 

I have updated original post with example. Please help me.

Hi @srajeshnkl

 

You could try adding the following calculated column to your table.   Just replace where I Table3 with your table name.

 

New Rank = CALCULATE(
                COUNTROWS('Table3'),
                FILTER('Table3',
                    'Table3'[Implemented date] < EARLIER('Table3'[Implemented date])
                    && YEAR('Table3'[Implemented date]) = YEAR(EARLIER('Table3'[Implemented date]))
                    && MONTH('Table3'[Implemented date]) = MONTH(EARLIER('Table3'[Implemented date]))                       
                    ))+1

To learn more about DAX visit : aka.ms/practicalDAX

Proud to be a Datanaut!

@Phil_Seamark

 

Thanks for your help. This works fine.

 

Now I want d to generate a report like below, This report is in another table, I have already configured names in the new table, Corresponding ranks for the particular months to be copied to this new sheet as below, If rank not found in previous table then apply NA or last rank. How to achieve this ?

 

 

NameJanFeb
Sathish56
Rajesh81
KarthikNANA
Visagan64
Suganya16
Vanitha210
Sangeetha31
Sahana106
Ravikumar41
Ramesh74
Harini96

Hi @srajeshnkl,

 

Have you tried the solution provided by @Phil_Seamark above? Does it work in your scenario? If it works, could you accept it as solution to close this thread?

 

If you still have any question on this issue, feel free to post here. Smiley Happy

 

Regards

Hi @srajeshnkl

 

You could try adding the following two calcuated columns

 

MonthID = FORMAT('Table3'[Implemented date],"YYYYMM")
Month = FORMAT(DATE(
            YEAR('Table3'[Implemented date]),
            MONTH('Table3'[Implemented date]),
            1),"MMM YY")

Make sure you hide MonthID and set Month to be sorted by MonthID

 

Then just drag the new Month column to the Column of a Matrix

 

ranky.png

 

 

 


To learn more about DAX visit : aka.ms/practicalDAX

Proud to be a Datanaut!

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors