Forum Discussion
How does RANKX work in a calculated column
- Anonymous1 year ago
Hi mp390988,
Thank you for reaching out in Microsoft Community Forum.
Thank you burakkaragoz for the helpful response.
Please follow below steps How RANKX Assigns Ranks in a Calculated Column;
Create a simple calendar table with Financial Year (FY) information.Dim Date =
ADDCOLUMNS(
CALENDAR(DATE(2024, 1, 1), DATE(2026, 12, 31)),
"Month", FORMAT([Date], "MMM"),
"Month Sort", MONTH([Date]),
"Qtr", "Q" & FORMAT([Date], "Q"),
"FY", "FY " &
IF(MONTH([Date]) <= 3,
YEAR([Date]) - 1 & "-" & YEAR([Date]),
YEAR([Date]) & "-" & YEAR([Date]) + 1
)
)
Calculated column to rank the FYs.FY Order =
RANKX(
'Dim Date',
'Dim Date'[FY],
,
DESC,
DENSE
)Add a Table visual.
Drag the following fields into the visual:
- Date
- Month
- Qtr
- FY
- FY Order (the calculated column)Please find the attached .pbix file for your reference.
If this post helps in resolve your issue, kindly consider marking it as "Accept as Solution" and give it a 'Kudos' to help others find it more easily.
Regards,
Pavan.
Hi mp390988 ,
Just wanted to check if you had the opportunity to review the suggestion provided?
If the response has addressed your query, please Accept it as a solution and give a 'Kudos' so other members can easily find it.
Thank you.
Hi @mp390988 ,
Just wanted to check if you had the opportunity to review the suggestion provided?
If the response has addressed your query, please Accept it as a solution and give a 'Kudos' so other members can easily find it.
Thank you.
- v-sshirivolu1 year agoCommunity Support
Hi mp390988 ,
May I ask if you have resolved this issue? If so, please mark the helpful reply and Accept it as the solution and give a 'Kudos'. This will be helpful for other community members who have similar problems to solve it faster.
Thank you