Menu
CoddyTech

Rows or the Total

Part of the DAX with CALCULATE section of Coddy's Power BI journey. Lesson 22 of 24.

A rank shows 1 in the total row, which means nothing.

ISINSCOPE(Column) is true in rows grouped by that column, false in the total.

Rank Shown = IF(ISINSCOPE(Products[Category]), RANKX(ALL(Products[Category]), [Revenue]))

IF with no else gives blank in the total.

challenge icon

Challenge

Medium

Write Rank Shown: each category's rank by Revenue, blank in the total row. It is checked for each category and the total.

Try it yourself

Rank Shown =
CategoryRank Shown
Coffee
Tea
Bakery
Merch
Total
Fields
  • Sales
    • Revenue
    • Total Units
    • Customers
  • Products
    • ProductID
    • Product
    • Category
    • UnitPrice
    • UnitCost
  • Stores
  • Customers
  • Dates
  • Targets

All lessons in DAX with CALCULATE