Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

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.

Reply
Anonymous
Not applicable

Rank Customer Names by Sales excluding Certain Customer Names

Hi,

 

I am a rookie in PBI. I want to rank customer names by sales. That sounds like an easy question. But I have to exclude certain customer names in ranking (particularly, i have to exclude all customrers with blank names in my dataset). 

 

I tried to filter the table and then do the ranking. It is not working for me. 

 

Thanks for help!

 

 

PBISean

4 REPLIES 4
v-chuncz-msft
Community Support
Community Support

@Anonymous,

 

You may refer to the following post.

https://community.powerbi.com/t5/Desktop/RANKX-excluding-blanks/m-p/397656#M181491

Community Support Team _ Sam Zha
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not applicable

Hi v-chuncz-msft,

 

Unfortunately, the post does not apply to my situation. 

 

The post is ranking the club but excluding club names which have blank YOY values.  

 

My situation is more like ranking the club but excluding the club names that are BLANK (let's call these clubs anonymous clubs). These anonymous clubs actually have YOY values. 

 

I tried to modified the formula in the post to my situation and it is not successful. 

 

Thanks,

 

PBISean

LivioLanzo
Solution Sage
Solution Sage

Hi @Anonymous are you able to post a sample of your dataset?

 


 


Did I answer your question correctly? Mark my answer as a solution!


Proud to be a Datanaut!  

Anonymous
Not applicable

Hi LivioLanzo,

 

Thanks for looking into this.

Here is a mock dataset for my purpose. I want to rank the Customer Name by Total Sales; however, I want to EXCLUDE the following two types of Customers in my ranking:

 

  1. Customers without Names, which are those BLANK cells in the Customer Name column
  2. Customers whose Sales Order Number are an even number

 

Customer Name

Sales

Sales Order Num

A

800

1

B

700

2

C

600

3

D

500

4

E

400

5

 

300

6

F

200

7

G

100

8

A

80

9

B

70

10

C

60

11

D

50

12

E

40

13

 

30

14

F

20

15

G

10

16

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.