• Skip to main content
  • Skip to footer

Curbal

Learn how to grow your business with your data and Power BI

  • Resources
    • DAX Glossary
    • Download Center
    • Template Apps
    • Data Stories Gallery
    • Solution Gallery
    • Learning Resources
  • Courses
    • Introduction to Power BI – FREE Online course
    • Power Query Online Training for Power BI
    • M Language Online Course: The unofficial and Practical Reference Guide
  • Blog
  • Shop
    • Courses
    • Swag
    • Template Apps
    • Donations
  • Cart
  • Register/ Log In
    • Become a Member
    • Log In
    • My account
    • My Courses
  • Contact
You are here: Home / CM Tooltip Glossary Pro+ / SUBSTITUTE

SUBSTITUTE

posted on April 20, 2018

« Back to Glossary Index

Syntax

SUBSTITUTE(<text>, <old_text>, <new_text>, <instance_num>)

Tutorial with example

In today’s video, we will learn how to use the DAX function SUBSTITUTE. Substitute changes text for another text. We will do two examples, how to substitute one value for another and how to substitute multiple values.

Download example file:

Not available

Remarks

Use the SUBSTITUTE function when you want to replace specific text in a text string; use the REPLACE function when you want to replace any text of variable length that occurs in a specific location in a text string.

The SUBSTITUTE function is case-sensitive. If case does not match between text and old_text, SUBSTITUTE will not replace the text.

This DAX function may return different results when used in a model that is deployed and then queried in DirectQuery mode.

Was this helpful?
[Total: 2   Average: 3/5]
Related Articles:
  • Reuse a Power BI file (change source path files)
« Back to Index

Reader Interactions

Let us know your thoughts... Cancel reply

Footer CTA

Join our community of +20,000 professionals

Become a Member

Subscribe to YouTube

About us

Curbal AB
Kopparbergsvägen, 10
722 13 – Västerås
Sweden

OrgNo: 5569680852 | VAT: SE556968085201

 

Location:

© Copyright 2014-2021 · Curbal AB · All Rights Reserved · Privacy Policy · Terms of Service · Refund Policy · Log In