Menu
CoddyTech

One Value or Many

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

SELECTEDVALUE(Column, alternate): the one value in the filter context, or the alternate.

Title = "Sales in " & SELECTEDVALUE(Stores[Country], "every country")

One country picked: its name. Several: "every country".

challenge icon

Challenge

Easy

Write Title: the text "Sales in " joined to the country, or "every country" when there is more than one. It is checked for each country and the total.

Try it yourself

Title =
CountryTitle
Portugal
Spain
Germany
Total
Fields
  • Sales
    • Revenue
    • Total Units
    • Customers
  • Products
  • Stores
    • StoreID
    • Store
    • City
    • Country
    • OpenDate
  • Customers
  • Dates
  • Targets

All lessons in DAX with CALCULATE