Quantcast
Channel: Desktop topics
Viewing all articles
Browse latest Browse all 213819

RANKX with Slicers

$
0
0

I'm having a little trouble with the RANKX function and Slicers. I'm uder the impression that when you select one or more members from a slicer on a report page, that the data available to visuals on the page is thereby filtered. Such does not apply if you display a measure that, by its definition, includes a larger or different set of data.

Here is what I have:

  • A Sales Table, with column [Line Item Total]
  • Sales table related to Item table on Item ID
  • Vendor table related to Item table on Vendor ID
  • A Calculated Column in the Vendor table: Vendor Ranking = RANKX( 'Vendors', SUMX(RELATEDTABLE('Sales'), [Line Item Total]))
  • A Customer table related to Sales table on Customer ID

When I use a table visual, and include Vendor Name, Sum of [Line Item Total], and Vendor Ranking, with no slicer, everything looks good. Sort by Sum of Line Item Total and you see that the Vendor that had the most sales of their items is at the top and ranked 1, next guy is ranked 2 and so on. Looks good.

 

Now, I add a slicer to the page and select one single Customer. The Vendors, still sorted by Sum of Line Item Total are now ranked 1, 9, 5, 3, 4 etc. NOT 1, 2, 3...

I have also tried the following formulas for the RANKX function:

 

  • RANKX(ALL('Vendors'), SUMX(RELATEDTABLE('Sales'), [Line Item Total]))
  • RANKX(ALLSELECTED('Vendors'), SUMX(RELATEDTABLE('Sales'), [Line Item Total]))

Also treid variation of the SUMX, replacing it with a pre-summed measure from the Sales table

[Sum Line Item Total] = SUM[Line Item Total]

 

Ultimately, the filtered list of Customers available to the user will be driven by Row Level Security, but I need to get this working with a Customer slicer then I know RLS will be accurate.

 

What am I missing?

 

Thanks in advance.

 


Viewing all articles
Browse latest Browse all 213819

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>