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!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
I have a data set "Test1" with repeat customer with all customer by month. then I count and calculate to percentage
| CustomerID | AREA | Repeat |
| 001 | A | |
| 001 | A | RR |
| 002 | A | |
| 003 | A | |
| 004 | B | |
| 005 | C | |
| 001 | A | RR |
| 006 | B | |
| 005 | C | RR |
| 007 | A | |
| 008 | B | |
| 009 | C | |
| 010 | C |
Count_all_customer = COUNTROWS(Test1)
Count_Repeat_customer = COUNTROWS(FILTER(RELATEDTABLE(Test1),Test1[Repeat]="RR"))
%repeat_customer = ([Count_Repeat_customer]/[Count_all_customer])
Now, I want to Ranking Percent Repeat Customer by Area like this
| AREA | all Customer | repeat Customer | %RR | Ranking |
| A | 6 | 2 | 33% | 3 |
| B | 3 | 0 | 0% | 1 |
| C | 4 | 1 | 25% | 2 |
when I used RANKX --> Result all ranking is "1"
Please advise how to correct this formula to achieve the desired result
Solved! Go to Solution.
Hi,
I am not sure I follow but as I understood you want to RANK your values based on %repeat_customer
Here is how to do this:
I hope this post helps to solve your issue and if it does consider accepting it as a solution and giving the post a thumbs up!
My LinkedIn: https://www.linkedin.com/in/n%C3%A4ttiahov-00001/
Proud to be a Super User!
Hi,
I am not sure I follow but as I understood you want to RANK your values based on %repeat_customer
Here is how to do this:
I hope this post helps to solve your issue and if it does consider accepting it as a solution and giving the post a thumbs up!
My LinkedIn: https://www.linkedin.com/in/n%C3%A4ttiahov-00001/
Proud to be a Super User!
thanks you , that's work 😃
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 16 | |
| 8 | |
| 4 | |
| 4 | |
| 3 |
| User | Count |
|---|---|
| 25 | |
| 13 | |
| 12 | |
| 10 | |
| 5 |