Posts

Showing posts with the label RANKX

Fixing “Top N and others” report when filtering by date - Unplugged #35

  https://www.youtube.com/watch?v=eoEbnQyianU

Filter top 3 products with a row for others using DAX in Power BI

  https://www.youtube.com/watch?v=nVvlEHKr_0o https://www.sqlbi.com/articles/filtering-the-top-products-alongside-the-other-products-in-power-bi/

Writing a DAX query using TOPN

  https://www.youtube.com/watch?v=tgL7D3JTa_E

Deep dive into measure filters in Power BI Desktop

  https://www.youtube.com/watch?v=miiGlDWeamM Scenario is to use a ranking measure as a filter on a matrix visual. The filter is used to only return the top 2 based on rank. When the measure is included in the matrix, the results are correct. Problem is when the measure is not included in the matrix, the results are not correct. Solution adds zero to a measure to keep it from returning blank.

RANKX and ISINSCOPE

  RankOnSale = IF ( ISINSCOPE ( Products[Product] ), RANKX ( ALLEXCEPT ( Products, Products[Category] ), [SumOfSales] ), IF ( ISINSCOPE ( Products[Category] ), RANKX ( ALLSELECTED ( Products[Category] ), [SumOfSales] ) ) )