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
anandav
Skilled Sharer
Skilled Sharer

Rank by selection and grand total

Hi All,

 

I am trying to do some ranking of vendors based on sales.

 

As shown in the below image there are ttwo measures:

1] Rank Vendor by Selection

Rank changes based on what products are selected for the vendor in the 'produc Slicer'

2] Rank by Vendor $ Value

Ranks the vendor by grand total for the vendor (irrespective of what product is selected in the 'Product Slicer)'

 

These two measure work correctly when used independantly. But when they are put in the same table, then 'Rank Vendor by Selection' measure displays '1' for all rows.

 

Rank.jpg

 

I tired changing 'Rank by Vendor $ Value' to a column and still the same result.

 

Any help to sort this would be greatly appreciated.

 

Thanks,

Anand

1 ACCEPTED SOLUTION
Phil_Seamark
Employee
Employee

Hi @anandav

 

Your [Rank Vendor by selection]  is using ALLSELECTED when perhaps you want to change it to ALL('DRM') like your other calculated measure.

 

The row header is filtering your RANKX function too heavily.

 

 


To learn more about DAX visit : aka.ms/practicalDAX

Proud to be a Datanaut!

View solution in original post

2 REPLIES 2
Phil_Seamark
Employee
Employee

Hi @anandav

 

Your [Rank Vendor by selection]  is using ALLSELECTED when perhaps you want to change it to ALL('DRM') like your other calculated measure.

 

The row header is filtering your RANKX function too heavily.

 

 


To learn more about DAX visit : aka.ms/practicalDAX

Proud to be a Datanaut!

@Phil_Seamark,

Thanks a lot Phil. That works!

 

But I don't understand what do you mean by "The row header is filtering your RANKX function too heavily".

 

Would you be bale to shed some light on that please?

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.