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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
RENJITH_R_S
Resolver II
Resolver II

Rankx based on Month wise and year wise

Hello friends,
I need a help on to find the ranking of applications based on its value in month wise and year wise. see the attachment. can you help this

 

Rank.JPG

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @RENJITH_R_S ,

Please refer to my pbix file to see if it helps you.

Create measures and columns.

total value = var _1= CALCULATE(SUM('Table'[Value]),FILTER(ALL('Table'),'Table'[Year]=EARLIER('Table'[Year])&&'Table'[Application]=EARLIER('Table'[Application])))
return
_1
Measure = RANKX(FILTER(ALL('Table'),'Table'[Year]=SELECTEDVALUE('Table'[Year])),CALCULATE(MAX('Table'[total value])),,DESC,Dense)
Measure 2 = RANKX(FILTER(ALL('Table'),'Table'[Month]=SELECTEDVALUE('Table'[Month])&&'Table'[Year]=SELECTEDVALUE('Table'[Year])),CALCULATE(MAX('Table'[Value])),,DESC,Dense)

vpollymsft_0-1673406296373.png

How to Get Your Question Answered Quickly 

 

If it does not help, please provide more details with your desired output and pbix file without privacy information (or some sample data) .

 

Best Regards
Community Support Team _ Polly

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

6 REPLIES 6
Anonymous
Not applicable

Hi @RENJITH_R_S ,

Please refer to my pbix file to see if it helps you.

Create measures and columns.

total value = var _1= CALCULATE(SUM('Table'[Value]),FILTER(ALL('Table'),'Table'[Year]=EARLIER('Table'[Year])&&'Table'[Application]=EARLIER('Table'[Application])))
return
_1
Measure = RANKX(FILTER(ALL('Table'),'Table'[Year]=SELECTEDVALUE('Table'[Year])),CALCULATE(MAX('Table'[total value])),,DESC,Dense)
Measure 2 = RANKX(FILTER(ALL('Table'),'Table'[Month]=SELECTEDVALUE('Table'[Month])&&'Table'[Year]=SELECTEDVALUE('Table'[Year])),CALCULATE(MAX('Table'[Value])),,DESC,Dense)

vpollymsft_0-1673406296373.png

How to Get Your Question Answered Quickly 

 

If it does not help, please provide more details with your desired output and pbix file without privacy information (or some sample data) .

 

Best Regards
Community Support Team _ Polly

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

@Anonymous Thank You for your help

Thennarasu_R
Responsive Resident
Responsive Resident

Hi ! 
@RENJITH_R_S 

I Cretaed one logic It have work fine. 
Step 1
You should create one calculated column based "YYYYMMDD" this Format .It will Came we change the Integer.that also I reated.

Below Formulas.

Thennarasu_R_0-1673328799973.png

Step 2
You Should created a measure to rank based on Month Year and Date .

Thennarasu_R_1-1673328925266.png

I hope this will help to You.

Thanks,
Thennarasu

@Thennarasu_R , thanks for your input but my requirement is different

amitchandak
Super User
Super User

@RENJITH_R_S , if you need combine rank

 

rankx(allselected(Date[Year], date[Month]), [Value Meausre])

 

This will rank inside the application, if you need an application also then

 

rankx(Summarize(allselected(Fact), Fact[Application], Date[Year], date[Month]), [Value Meausre])

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

@amitchandak it returns value as 1 only

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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