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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

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
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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