cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Surafel
Helper I
Helper I

Excluding Blank For Ranking the Total Sales

I want to rank the vendors name based on their total sales. I am using the dax formula below, but I came to know that the highest sales is for Blank and ranked 1. Can anyone please help me to remove the blank and start counting from 1.
 

 

Month Rank = RANKX(ALL('Vendors'), SUMX(RELATEDTABLE(Sales), [Sales in $]))

 

1 ACCEPTED SOLUTION
amitchandak
Super User IV
Super User IV

@Surafel , Try like

Month Rank = RANKX(filter(ALL('Vendors'), not(isblank(SUMX(RELATEDTABLE(Sales), [Sales in $])))), SUMX(RELATEDTABLE(Sales), [Sales in $]))



Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!
Dashboard of My Blogs !! YouTube Channel !! Connect on Linkedin

Proud to be a Super User!

View solution in original post

1 REPLY 1
amitchandak
Super User IV
Super User IV

@Surafel , Try like

Month Rank = RANKX(filter(ALL('Vendors'), not(isblank(SUMX(RELATEDTABLE(Sales), [Sales in $])))), SUMX(RELATEDTABLE(Sales), [Sales in $]))



Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!
Dashboard of My Blogs !! YouTube Channel !! Connect on Linkedin

Proud to be a Super User!

View solution in original post

Helpful resources

Announcements
PBI User Groups

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Get Ready for Power BI Dev Camp

Power BI Dev Camp - June 24th

Mark your calendars and join us for our next Power BI Dev Camp!

Top Solution Authors
Top Kudoed Authors