Forum Discussion

HDBI's avatar
HDBI
Regular Visitor
3 years ago

Cannot get total to show with RANKX using variables

Hi,

 

I create a measure calculating RANKX in a variable and then created another variable that limits the items returned only the Top 5 based on their rank (see 1st image below).  This works fine and correctly returns the top 5 products and their sales.  However, the total of these products is blank (when it should be the sum of the Top 5 products (see 2nd image below).

 

I did already find a different way to correctly get what I need but for my own knowedge, would someone mind telling me:

  • Why this is returning a blank total and not the sum of the Top 5 products
  • How to correct the DAX to return the correct total (sum of the Top 5 products)

Thank you!

 

(1st Image):

 

(2nd Image):

 

2 Replies