Daily DAX : Day 401 UPPER

Power BI DAX Function: UPPER

Syntax

UPPER(<text>)

Description

The UPPER function converts all letters in a text string to uppercase. Non-letter characters (numbers, spaces, symbols) remain unchanged.

Parameters

ParameterDescription
<text>A text string or a column containing text

Return Value

A text string with all letters converted to uppercase.

Common Use Cases

  • Standardizing data for lookups – Ensure consistent matching regardless of original case (e.g., "USA", "usa", "UsA" → all become "USA")
  • Creating case-insensitive keys for relationships or merging queries
  • Data cleansing – Make customer names, product codes, or categories appear uniform in reports
  • Sorting consistency – When combined with sorting, uppercase ensures predictable alphabetical order

Examples

1. Simple Calculated Column

Customer Name Upper = UPPER(Customers[CustomerName])
CustomerNameCustomer Name Upper
john doeJOHN DOE
Alice SmithALICE SMITH
bob123BOB123

2. Case-Insensitive Lookup (Common Scenario)

Country Match = 
LOOKUPVALUE(
    Countries[Region],
    Countries[CountryCode], UPPER(Sales[ShipCountry])
)

This ensures the lookup works even if Sales[ShipCountry] has mixed case like "usa", "USA", or "UsA".

3. Measure Example

Upper Product Category = 
CONCATENATEX(
    VALUES(Products[Category]),
    UPPER(Products[Category]),
    ", "
)

Returns: BEVERAGES, CONDIMENTS, SEAFOOD

Tips

  • Use UPPER together with LOWER or EXACT for case-insensitive comparisons.
  • Avoid applying UPPER repeatedly in measures if performance matters — consider creating a calculated column instead.

Related Functions: LOWER(), PROPER(), EXACT(), FIND() / SEARCH()

Comments

Popular posts from this blog

Daily DAX : Day 131 SELECTEDMEASURE

Daily DAX : Day 446 INFO.CSDLMETADATA

Daily DAX : Day 453 ENDOFWEEK