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
Cyriackpazhe
Helper III
Helper III

RankX

Screenshot (45).pngWhy is this happening. I want to rank the each quarter in the respective years. How come this is happening. Any explanation as to why this is happening when it should give the correct results. 

 

6 REPLIES 6
Anonymous
Not applicable

Hi @Cyriackpazhe 
I hope this information is helpful. Please let me know if you have any further questions or if you'd like to discuss this further. If this answers your question, please Accept it as a solution and give it a 'Kudos' so others can find it easily.
Thank you.

Anonymous
Not applicable

Hi @Cyriackpazhe 
I wanted to check if you had the opportunity to review the information provided @divyed , @BeaBF and @Azadsingh . Please feel free to contact us if you have any further questions. If their response has addressed your query, please accept it as a solution and give a 'Kudos' so other members can easily find it.
Thank you.

Anonymous
Not applicable

Hi @Cyriackpazhe
Thank you for reaching out microsoft fabric community forum.

May I ask if you have resolved this issue? If so, please mark the helpful reply and accept it as the solution. This will be helpful for other community members who have similar problems to solve it faster.

Thank you.

divyed
Super User
Super User

Hello @Cyriackpazhe ,

 

You can try below dax for your purpose, this will be easier and optimized  :

 

NewRank =
ROWNUMBER (
ALL ( Datestbl[Year], Datestbl[QuarterOfYear] ),  // Add fields you want in visual
ORDERBY ( [TotalSales], DESC ),
PARTITIONBY ( Datestbl[Year] )  //Will reset ranking for each year
)

 

divyed_0-1741352134589.png

I hope this helps.

 

Did I answer your query ? Mark this as solution if this helps, Kudos are appreciated.

 

Warm Regards,

Neeraj

LinkedIn : https://www.linkedin.com/in/neeraj-kumar-62246b26/
BeaBF
Super User
Super User

@Cyriackpazhe Hi! Try with:

 

Rank2 =
RANKX(
ALLEXCEPT('Calendar', 'Calendar'[Date].[Year]),
[Total],
,
DESC,
Dense
)

 

BBF

Azadsingh
Helper I
Helper I

Hi @Cyriackpazhe , Try this

"Rank_Quarter =RANKX(FILTER(ALL(Calendar),Calendar[Year] = SELECTEDVALUE(Calendar[Year]) ),[Total],, DESC)

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.