LOD equivalent of INDEX and RANK (part 2)

In my last blog post I looked at a LOD equivalent of RANK / INDEX table calculations in Tableau. That approach was limited to ranking a very small range of whole numbers, and left me considering other options. This post outlines another LOD approach using spatial functions**!** WARNING: As before I will stress that you should rarely need a LOD-based equivalent of rank or index, and can often use table calculations when you don’t think that you can. That said, there are scenarios where a LOD equivalent can be useful: onward use of the calc or use in spatial functions being the cases I’ve seen on the Tableau community forums. And it’s also a fun challenge! ...

January 31, 2025 · 8 min · Steve

Top M within each top N of categories

I recently helped with a Tableau community forums question where the user needed to: filter to the top N categories based on a measure, using a dense rank (so that categories with the same value had the same rank), but list no more than M categories within each rank (based on another criteria) This screenshot illustrates the requirement where we want to see the top 5 categories based on sales, where categories with the same sales have the same rank. But we only want to see the top 2 within each rank, based on lowest cost: ...

September 3, 2023 · 3 min · Steve