Checks one expression against several candidate values, returning whichever result pairs with the match (or a fallback otherwise). Writing SWITCH ( TRUE (), ... ) avoids nested IF chains: whichever condition is first true wins.
Read more: Microsoft Learn
In the Ultra Transcenders books
Each book explains SWITCH in context, with comparison tables and the common traps.
Terms in this definition
- VALUES
Returns in DAX the distinct column values, or table rows, still visible after filters are applied, sometimes with an extra blank entry. CALCULATE often takes the result as a table filter.
- MATCH
Used in WHERE when querying SQL Graph, it describes how to walk from node to node through edge tables, with patterns written like p1-(f1)->p2.
- FIRST
A DAX function available only inside visual calculations. It fetches the value at the start of one axis of the visual's matrix, which makes it handy for comparing each point with the first; its opposite is LAST.
- WINS
Windows Internet Name Service, an old way of resolving NetBIOS names to IP addresses. It is deprecated and should be replaced by DNS.
Related terms
- Assume referential integrity
A relationship setting in DirectQuery and Direct Lake models that lets the engine send faster INNER JOIN queries to the source rather than OUTER JOINs. Only switch it on when every key on the many side has a match, otherwise unmatched fact rows quietly vanish from results.
- Azure Activity
Connector for Microsoft Sentinel that streams each subscription's activity log, via diagnostic settings, into the AzureActivity table. A subscription that was hooked up the older, legacy way needs disconnecting before you switch over.
- Azure Monitor OpenTelemetry Distro
Recommended way to instrument applications for Application Insights today: Microsoft's packaged OpenTelemetry, sending logs, metrics and traces there. Python apps switch it on by calling configure_azure_monitor().
- Canary management group hierarchy
A test copy of your live landing zone structure, with canary in each ID and placed directly beneath the root, that you can switch on if wanted. Policy, RBAC and subscription placement changes are tried there first, then promoted.
- Classic Tenant Creation
Feature flag in VCF Automation that a provider has to switch on before creating VM Apps organizations, the classic tenancy model, rather than All Apps ones.
- Cross-report drillthrough
Drilling through across reports: a right-click on a visual opens a detail page held in a different report, provided both sit in one workspace. Authors switch the option on for the destination report, and the linked fields have to share names and data types.
- Custom network indicators
Switch this Defender for Endpoint advanced setting on first, otherwise URL, domain and IP address indicators can't permit or block connections; network protection is what actually enforces them.
- Customer-managed keys
RSA or RSA-HSM key of 2048, 3072 or 4096 bits that you keep in Key Vault or Managed HSM to wrap a storage account's encryption key. You can switch it on later, except for tables and queues, whose CMK support must be chosen at creation.