Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.
Good day
I've been having endless issues with Ranking that I decided to start the report from scratch. So I now have two tables, PAR and Branch Details. Reason for having Branch Details table is, I will have to add other tables which will link to Branch Details as the report is Branch ranking, where I have to rank branches based on multiple measures, hence multiple tables.
Below is my data model:
So as a start, I'm ranking on one measure i.e. Percentage. The ranking works when I use the Branch Name for the fact table (PAR), as seen below:
RankbyPerc = var _perc = CALCULATE(SUM(PAR[Percentage]))
RETURN
RANKX(ALL(PAR[Branch Name]), CALCULATE(sum(PAR[Percentage])), , ASC, Dense)
As soon as I start using the Branch name from the linked table Branch Details which I have to use when I add more tables, the Ranking breaks. This is because there are some branches on the PAR table which are not on the Branch Details table. This is correct as there was nothing on them for the month I'm looking at so I cannot exclude them from the report.
So to get around this, I added a condition to check for blanks, which seems to work but the problem is, it's starting at 2:
RankbyPerc = var _perc = CALCULATE(SUM(PAR[Percentage]))
RETURN
IF(NOT(ISBLANK(_perc)),
RANKX(ALL('Branch Details'[description]), CALCULATE(sum(PAR[Percentage])), , ASC, Dense),BLANK())
I even tried this formula, but it ranks everything as 1:
RankbyPerc = var _perc = CALCULATE(SUM(PAR[Percentage]))
RETURN IF (
ISBLANK ( _perc) = FALSE (),
RANKX (
ALL ( 'Branch Details'[description] ),
CALCULATE (
_perc,
ALLEXCEPT ( 'Branch Details', 'Branch Details'[description] )
)
)
)
Please assist.
Thanking you in advance.
Please provide sample data (with sensitive information removed) that covers your issue or question completely, in a usable format (not as a screenshot). Leave out anything not related to the issue.
If you are unsure how to do that please refer to https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-...
Please show the expected outcome based on the sample data you provided.
If you want to get answers faster please refer to https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447...
Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!
Check out the September 2025 Power BI update to learn about new features.