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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

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
July 2025 community update carousel

Fabric Community Update - July 2025

Find out what's new and trending in the Fabric community.

July PBI25 Carousel

Power BI Monthly Update - July 2025

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