Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hi
So I have a rankx formula and a previousquarter function, and it is producing logical results depending on the sort order, but not what I want. Ha!
It works fine when DESC, but treats a blank in the previous quarter as ranked 1 (but inserts a blank as that is what I have coded, when ASC and starts the previous quarter ranking at 2 for the others.
I want the PQ Rank not to include the blank. and for customers S T and U to be ranked #1 in the previous quarter (as they actually were #1 in the previous quarter, until customer A came along in the latest quarter).
Any assistance to ignore the PQ ranking for Customer A and start at 1 would be greatly appreciated.
Customer A had no data previous quarter, and when the rank is sorted DESC the results are like this.
Customer | KPI value | KPI Rank | PQ KPI rank | Rank change |
H | 5 | 7 | 4 | +3 |
G | 10 | 3 | 3 | 0 |
F | 8 | 4 | 3 | +1 |
E | 21 | 1 | 3 | -2 |
D | 5 | 7 | 3 | +4 |
C | 10 | 3 | 2 | +1 |
B | 16 | 2 | 1 | +1 |
A | 5 | 7 |
and when the rank is sorted ASC I get these results.
Customer | KPI value | KPI Rank | PQ KPI rank | Rank change |
Y | 2 | 2 | 3 | -1 |
X | 2 | 2 | 3 | -1 |
W | 3 | 3 | 3 | 0 |
V | 3 | 3 | 3 | 0 |
U | 1 | 1 | 2 | -1 |
T | 1 | 1 | 2 | -1 |
S | 1 | 1 | 2 | -1 |
A | 5 | 5 |
But what I want is
Customer | KPI value | KPI Rank | PQ KPI rank | Rank change |
Y | 2 | 2 | 2 | 0 |
X | 2 | 2 | 2 | 0 |
W | 3 | 3 | 2 | 0 |
V | 3 | 3 | 2 | +1 |
U | 1 | 1 | 1 | 0 |
T | 1 | 1 | 1 | 0 |
S | 1 | 1 | 1 | 0 |
A | 5 | 5 |
I am using
KPI Rank =
Solved! Go to Solution.
@johnmelbourne , refer
https://community.powerbi.com/t5/Desktop/RANKX-excluding-blanks/m-p/397656#M181491
or
https://community.powerbi.com/t5/Desktop/RANKX-excluding-blanks/td-p/396044
https://community.powerbi.com/t5/Desktop/RANKX-Ignore-blank-zero-across-time/td-p/436949
https://community.powerbi.com/t5/Desktop/RANKX-without-zeros-and-blanks/td-p/599558
Hi @johnmelbourne ,
Have a look at this video.
Some ways how to avoid ranking BLANKS().
https://www.youtube.com/watch?v=z2qzJVeYhTY
Regards,
Harsh Nathani
Appreciate with a Kudos!! (Click the Thumbs Up Button)
Did I answer your question? Mark my post as a solution!
@johnmelbourne , refer
https://community.powerbi.com/t5/Desktop/RANKX-excluding-blanks/m-p/397656#M181491
or
https://community.powerbi.com/t5/Desktop/RANKX-excluding-blanks/td-p/396044
https://community.powerbi.com/t5/Desktop/RANKX-Ignore-blank-zero-across-time/td-p/436949
https://community.powerbi.com/t5/Desktop/RANKX-without-zeros-and-blanks/td-p/599558
Many thanks @amitchandak , I will review with interest.
Believe or not, I did try and find similar posts first.
I am sure these will be helpful.
Regards
John
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
113 | |
99 | |
80 | |
70 | |
59 |
User | Count |
---|---|
149 | |
114 | |
107 | |
89 | |
67 |