Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hello all,
I am trying to create a measure that ranks by the number of instances a text field appears in a table. For reference, the table is a simple table for a single line for every conversation with a business executive and the process that was discussed. I am trying to count each instance of the process that was discussed and rank them from most important to least (highest to lowest). Below is a snip of the main table (FYI I had to create a calculated column to count the instances of each process because I couldn't figure out how to build that into the measure).
I am able to get the result that I want when I test it by creating a blank table, but when it comes to putting it in a measure and in a matrix visual, the rank value appears as 1s for every single row and I can't seem to figure out why. Here is the DAX code of the test table I created and a snip of the output.
test =
ADDCOLUMNS (
SUMMARIZE (
'FACT Mgmt Convos',
'FACT Mgmt Convos'[Secondary Processes Mentioned],
'FACT Mgmt Convos'[Count of Process]
),
"Rank",
RANK (
DENSE,
SUMMARIZE (
'FACT Mgmt Convos',
'FACT Mgmt Convos'[Secondary Processes Mentioned],
'FACT Mgmt Convos'[Count of Process]
),
ORDERBY ( 'FACT Mgmt Convos'[Count of Process], DESC )
)
)
As you can see, the Rank column works just fine. Below is my DAX code for the measure which is pretty much the same exact thing.
Mgmt Mentions Ranking =
RANK (
DENSE,
SUMMARIZE (
'FACT Mgmt Convos',
'FACT Mgmt Convos'[Secondary Processes Mentioned],
'FACT Mgmt Convos'[Count of Process]
),
ORDERBY ( 'FACT Mgmt Convos'[Count of Process], DESC )
)
And here is a snip of the matrix visual.
Any guidance on why each row is populating with a rank of 1?
Solved! Go to Solution.
Hi,
Please try something like below whether it suits your requirement.
Mgmt Mentions Ranking =
RANK (
DENSE,
SUMMARIZE (
ALLSELECTED ( 'FACT Mgmt Convos' ),
'FACT Mgmt Convos'[Secondary Processes Mentioned],
'FACT Mgmt Convos'[Count of Process]
),
ORDERBY ( 'FACT Mgmt Convos'[Count of Process], DESC )
)
Hi,
Please try something like below whether it suits your requirement.
Mgmt Mentions Ranking =
RANK (
DENSE,
SUMMARIZE (
ALLSELECTED ( 'FACT Mgmt Convos' ),
'FACT Mgmt Convos'[Secondary Processes Mentioned],
'FACT Mgmt Convos'[Count of Process]
),
ORDERBY ( 'FACT Mgmt Convos'[Count of Process], DESC )
)
I was trying to toy around with ALLSELECTED but clearly wasn't putting it in the right position or something. Thank you so much, it worked perfectly!
Check out the July 2025 Power BI update to learn about new features.
User | Count |
---|---|
24 | |
9 | |
7 | |
6 | |
6 |
User | Count |
---|---|
28 | |
11 | |
11 | |
10 | |
6 |