EPC Group Logo
G2 Leader Awards - Business Intelligence Consulting
BlogContact
‌
‌
‌
‌
‌
‌
‌
‌
‌
‌
‌
‌
‌
‌
‌
‌
‌
‌
‌
‌
‌
‌
‌
‌
‌
‌
‌
‌
‌
‌
‌
‌
‌
‌
‌
‌
‌
‌

EPC Group

Enterprise Microsoft consulting with 28+ years serving Fortune 500 companies.

(888) 381-9725
contact@epcgroup.net
4900 Woodway Drive - Suite 830
Houston, TX 77056

Follow Us

Solutions

  • All Services
  • Microsoft 365
  • AI Governance
  • Migrations
  • Microsoft Copilot
  • Dynamics 365
  • Teams vs Slack

Power BI

  • Dashboard Guide
  • Gateway Setup
  • Premium Features
  • Lookup Functions
  • Power Pivot vs BI
  • Treemaps Guide
  • Dataverse

Company

  • About Us
  • Case Studies
  • Blog
  • Resources
  • Contact

Microsoft Teams

  • Teams Questions
  • Teams Healthcare
  • Task Management
  • PSTN Calling
  • Enable Dial Pad

Azure & SharePoint

  • Azure Databricks
  • Azure DevOps
  • Azure Synapse
  • SharePoint MySites
  • SharePoint ECM
  • SharePoint vs M-Files

Comparisons

  • M365 vs Google
  • Databricks vs Dataproc
  • Dynamics vs SAP
  • Intune vs SCCM
  • Power BI vs MicroStrategy

Legal

  • Sitemap
  • Privacy Policy
  • Terms
  • Cookies

© 2026 EPC Group. All rights reserved.

‌
‌
‌
‌
‌
‌
‌
‌
‌
‌
‌
‌
‌
‌
‌
‌
‌
‌
‌
‌
‌
‌
‌
‌
‌
‌
‌
‌
‌
‌
‌
‌
‌
‌
‌
‌
‌
‌
‌
‌
‌
‌
‌
‌
‌
‌
‌
‌
‌
‌
‌
‌
‌
‌
‌
‌
‌
‌
‌
‌
‌
‌
‌
‌
‌
‌
‌
‌
‌
‌
‌
‌
‌
‌
‌
‌
‌
‌
‌
‌
‌
‌
‌
‌
‌
‌
‌
‌
‌
‌
‌
‌
‌
‌
‌
‌
‌
‌
‌
‌
‌
‌
‌
‌
‌
‌
‌
‌
‌
‌
‌
‌
‌
‌
‌
‌
‌
‌

Power BI Concatenate: Complete Guide to Text Combination in DAX

Power BI

HomeBlogPower BI
Back to BlogPower BI

Power BI Concatenate: Complete Guide to Text Combination in DAX

Master text concatenation in Power BI using DAX functions including ampersand operator, CONCATENATE, and CONCATENATEX. Includes 15+ real-world examples from Fortune 500 implementations with performance optimization techniques.

EO
Errin O'Connor
Chief AI Architect & CEO
•
June 18, 2024
•
15 min read
Power BIDAXConcatenateData ModelingPerformance
Power BI Concatenate: Complete Guide to Text Combination in DAX

Power BI Concatenate: Complete Guide to Text Combination in DAX

Understanding Concatenation in Power BI

Text concatenation in Power BI involves combining multiple text values into a single string. Whether you're building customer names from first and last name fields, creating custom labels, or merging address components, mastering concatenation is essential for data modeling.

After implementing Power BI across 500+ Fortune 500 engagements, EPC Group has identified the patterns, pitfalls, and performance optimizations that separate amateur implementations from enterprise-grade solutions.

The Three Core Concatenation Methods

Method 1: The Ampersand Operator (&)

The simplest concatenation approach uses the & operator:

Full Name = [First Name] & " " & [Last Name]

When to Use:

  • Simple, static concatenations
  • Two or three fields maximum
  • Performance-critical calculated columns
  • No conditional logic required

Real-World Example from Healthcare Client:

Patient Identifier =
    [Patient Last Name] & ", " &
    [Patient First Name] & " (DOB: " &
    FORMAT([Date of Birth], "MM/DD/YYYY") & ")"

Result: "Smith, John (DOB: 03/15/1975)"

Method 2: CONCATENATE Function

DAX's CONCATENATE function handles two strings:

Full Name = CONCATENATE([First Name], CONCATENATE(" ", [Last Name]))

Limitations:

  • Only two parameters allowed
  • Requires nesting for multiple values
  • Less readable than & operator
  • Same performance characteristics

When to Use: Rarely. The & operator provides better readability.

Method 3: CONCATENATEX (The Enterprise Solution)

CONCATENATEX iterates over tables and concatenates with delimiters:

All Products =
CONCATENATEX(
    Products,
    [Product Name],
    ", ",
    [Product Name],
    ASC
)

Parameters:

  1. Table: The table to iterate over
  2. Expression: The value to concatenate
  3. Delimiter: Text between values (optional)
  4. OrderBy Expression: Sort column (optional)
  5. Order: ASC or DESC (optional)

Performance Considerations:

  • Scans entire table on each evaluation
  • Can cause performance issues with millions of rows
  • Use FILTER carefully to reduce iteration scope
  • Consider pre-aggregating when possible

Advanced Concatenation Patterns

Pattern 1: Handling Blank Values

Problem: Blank values create unwanted spaces or delimiters.

Solution: Use IF or ISBLANK:

Full Address =
VAR Street = [Street Address]
VAR Suite = [Suite Number]
VAR City = [City]
VAR State = [State]
VAR Zip = [Postal Code]
RETURN
    Street &
    IF(NOT(ISBLANK(Suite)), ", " & Suite, "") &
    ", " & City & ", " & State & " " & Zip

Pattern 2: Conditional Concatenation

Use Case: Different formats based on conditions.

Customer Display =
IF(
    [Customer Type] = "Business",
    [Company Name] & " (Contact: " & [Contact Name] & ")",
    [First Name] & " " & [Last Name]
)

Pattern 3: Delimited Lists with CONCATENATEX

Use Case: Show all products in an order.

Order Products =
CONCATENATEX(
    RELATEDTABLE(OrderDetails),
    RELATED(Products[Product Name]) & " (Qty: " & [Quantity] & ")",
    "; ",
    RELATED(Products[Product Name]),
    ASC
)

Result: "Widget A (Qty: 5); Widget B (Qty: 3); Premium Service (Qty: 1)"

Pattern 4: Multi-Column Concatenation with Variables

Best Practice: Use variables for readability and performance:

Enhanced Product Description =
VAR ProductName = [Product Name]
VAR Category = RELATED(Categories[Category Name])
VAR Supplier = RELATED(Suppliers[Company Name])
VAR Price = FORMAT([Unit Price], "$#,##0.00")
VAR Stock = [Units In Stock]
RETURN
    ProductName & " | " &
    Category & " | " &
    "Supplier: " & Supplier & " | " &
    "Price: " & Price & " | " &
    "Stock: " & Stock

Performance Optimization Strategies

Strategy 1: Calculated Column vs. Measure

Calculated Columns:

  • Computed during data refresh
  • Stored in the model
  • Increases model size
  • Fast query performance

Measures:

  • Computed at query time
  • Don't increase model size
  • Performance varies by context
  • More flexible

Recommendation: Use calculated columns for frequently-used concatenations displayed in tables/slicers. Use measures for dynamic, context-dependent concatenations.

Strategy 2: Pre-Concatenate in Power Query

Better Performance:

Power Query (M):

#"Added Full Name" = Table.AddColumn(
    #"Previous Step",
    "Full Name",
    each [First Name] & " " & [Last Name],
    type text
)

Advantages:

  • Concatenation happens during refresh, not query time
  • Results are compressed in columnar storage
  • No DAX evaluation overhead
  • Easier to debug and maintain

Use When: The concatenation logic is static and doesn't require runtime context.

Strategy 3: Minimize CONCATENATEX Scope

Problem: CONCATENATEX over large tables kills performance.

Bad:

All Customer Products =
CONCATENATEX(
    FILTER(
        ALL(Sales),
        [Customer ID] = EARLIER([Customer ID])
    ),
    RELATED(Products[Product Name]),
    ", "
)

Better:

All Customer Products =
CONCATENATEX(
    RELATEDTABLE(Sales),
    RELATED(Products[Product Name]),
    ", "
)

Performance Improvement: 10-100x faster by using RELATEDTABLE instead of FILTER(ALL()).

Real-World Use Cases

Use Case 1: Financial Services Dashboard

Requirement: Display transaction descriptions with account, date, and amount.

Transaction Summary =
VAR AccountNum = FORMAT([Account Number], "0000")
VAR TranDate = FORMAT([Transaction Date], "MM/DD/YYYY")
VAR Amount = FORMAT([Amount], "$#,##0.00")
VAR Type = [Transaction Type]
RETURN
    "Acct " & AccountNum & " | " &
    TranDate & " | " &
    Type & " | " &
    Amount

Use Case 2: Healthcare Patient Records

Requirement: HIPAA-compliant patient identifiers without PHI.

Patient Identifier =
VAR LastInitial = LEFT([Last Name], 1)
VAR FirstInitial = LEFT([First Name], 1)
VAR DOBYear = YEAR([Date of Birth])
VAR MRNLast4 = RIGHT([Medical Record Number], 4)
RETURN
    LastInitial & FirstInitial & "-" & DOBYear & "-" & MRNLast4

Result: "JS-1975-8432" (de-identified for reports)

Use Case 3: Manufacturing Part Numbers

Requirement: Generate SKUs from category, size, color.

SKU =
    LEFT([Category Code], 3) & "-" &
    [Size Code] & "-" &
    [Color Code] & "-" &
    FORMAT([Product ID], "0000")

Common Errors and Solutions

Error 1: "Cannot convert value to text"

Cause: Attempting to concatenate non-text types.

Solution: Use FORMAT or TEXT:

Description = [Product Name] & " - Qty: " & FORMAT([Quantity], "0")

Error 2: "The expression contains multiple columns"

Cause: CONCATENATEX expression returns multiple columns.

Solution: Explicitly reference single column:

// Wrong
CONCATENATEX(Products, Products, ", ")

// Right
CONCATENATEX(Products, Products[Product Name], ", ")

Error 3: Circular Dependency

Cause: Calculated column references itself through relationships.

Solution: Use variables or restructure dependencies:

Full Name =
VAR FirstName = [First Name]
VAR LastName = [Last Name]
RETURN FirstName & " " & LastName

Best Practices from 500+ Implementations

  1. Use Variables: Improve readability and debugging
  2. Handle Blanks: Always check for BLANK() values
  3. Format Numbers: Use FORMAT for consistent output
  4. Optimize Scope: Minimize CONCATENATEX iterations
  5. Power Query First: Pre-concatenate when logic is static
  6. Test Performance: Use DAX Studio to measure query times
  7. Document Complex Logic: Add comments for maintenance
  8. Consider Model Size: Calculated columns increase storage
  9. Use Delimiters Wisely: Make output easily parseable
  10. Plan for Scale: Test with production data volumes

Conclusion

Text concatenation in Power BI ranges from simple & operators to complex CONCATENATEX iterations. The key to enterprise-grade implementations is choosing the right approach for your use case:

  • Simple, static: Use & in calculated columns
  • Dynamic, aggregated: Use CONCATENATEX measures
  • Performance-critical: Pre-concatenate in Power Query
  • Complex conditional: Use variables and IF statements

After 5,200+ Power BI projects, EPC Group has learned that the difference between a working solution and an enterprise solution lies in these optimization patterns.


Need help optimizing your Power BI data model for performance at scale? EPC Group specializes in enterprise Power BI implementations for Fortune 500 companies. Contact us for a technical assessment.

Share this article:
EO

Errin O'Connor

Chief AI Architect & CEO

28+ years Microsoft consulting experience, bestselling Microsoft Press author

View Full Profile

Related Articles

Power BI

Power BI SWITCH Function: Advanced DAX Patterns for Conditional Logic

Learn to use SWITCH and SWITCH(TRUE()) for complex conditional logic in Power BI. Includes performance comparisons vs. nested IF, real-world enterprise examples, and optimization techniques for large datasets.

Power BI

10 Power BI Dashboard Design Best Practices for Enterprise 2026

Master enterprise Power BI dashboard design with proven best practices from 500+ Fortune 500 implementations. Learn layout strategies, color theory, performance optimization, and user experience principles.

Power BI

Power BI Row-Level Security: Implementation Guide for Healthcare

Master Power BI Row-Level Security (RLS) for HIPAA-compliant healthcare analytics. Complete guide with DAX patterns, dynamic security, testing protocols, and real-world implementations for multi-tenant environments.

Need Help with Power BI?

Our team of experts can help you implement enterprise-grade power bi solutions tailored to your organization's needs.

Schedule a ConsultationCall (888) 381-9725