cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
RuksanaBegum Frequent Visitor
Frequent Visitor

RankX return many 1s

Hello all,

 

Iam trying to rank the customerNumber based on the sales. Top sales as 1 and next as 2 and so on .. But I get lot of rank values as 1. 

 

This is how I am getting.

CustomerNumberCustomerNameSales$Rank
16290A4302341
3874B428866
16364C3642071
14920D3642071

 

I am expecting something like below.

CustomerNumberCustomerNameSales$Rank
16290A4302341
3874B4288662
16364C3642073
14920D364207

4

 

I used this : 

Rank = RANKX(ALL('DC-R Ace'[CustomerNumber]),CALCULATE(SUM('DC-R Ace'[EachesCost])),,DESC)
 
Where am I doing wrong. Please help.
 
Thanks
1 ACCEPTED SOLUTION

Accepted Solutions
AnkitBI Established Member
Established Member

Re: RankX return many 1s

For your case, Use below

 

Rank = RANKX(ALL('DC-R Ace'[CustomerNumber],'DC-R Ace'[CustomerName]),CALCULATE(SUM('DC-R Ace'[Sales$])),,DESC)

Thanks
Ankit Jain

Do Mark it as solution if the response resolved your problem. Do like the response if it seems good and helpful.

View solution in original post

4 REPLIES 4
AnkitBI Established Member
Established Member

Re: RankX return many 1s

In your fromual what is [EachesCost] ?

RuksanaBegum Frequent Visitor
Frequent Visitor

Re: RankX return many 1s

Sorry for the inclmplete data..
DC-R Ace is the table,
[Eachescost] is the Sales$ column.

 

 

AnkitBI Established Member
Established Member

Re: RankX return many 1s

For your case, Use below

 

Rank = RANKX(ALL('DC-R Ace'[CustomerNumber],'DC-R Ace'[CustomerName]),CALCULATE(SUM('DC-R Ace'[Sales$])),,DESC)

Thanks
Ankit Jain

Do Mark it as solution if the response resolved your problem. Do like the response if it seems good and helpful.

View solution in original post

RuksanaBegum Frequent Visitor
Frequent Visitor

Re: RankX return many 1s

@AnkitBI  Thanks a ton for the help.
I ve realized that We are supposed to add all the columns to the DAX formula that we are adding on to the visual. 

Helpful resources

Announcements
Ask Amanda Anything Q&A

Ask Amanda Anything Q&A

Learn the answers to some of the questions asked during the Amanda Triple A event.

October 2019 Community Highlights

October 2019 Community Highlights

October was a busy month in the community. Read the recap article to learn about some of the events and content.

New Solution Badges

New Solution Badges

Two waves of brand new solution badges are coming! Read the article for more information on our new community badges.

Analytics in Azure virtual event

Analytics in Azure virtual event

Experience a limitless analytics service built to ingest, prep, manage, and serve data for immediate use in Power BI.

Users Online
Currently online: 442 members 3,998 guests
Please welcome our newest community members: