DAX

Stairway to DAX

Level 28: DAX Text Functions: The DAX Extract & Modify Functions: LEFT(), RIGHT(), MID(), REPLACE(), SUBSTITUTE()

  • Stairway Step

Business Intelligence Architect, Data Analyst, CPA, and author Bill Pearson introduces a subseries surrounding the DAX Text Functions, including LEFT(), RIGHT(), MID(), REPLACE(), and SUBSTITUTE() and breaks out the operational groups of functions involved. Next, he introduces the “Extract and Modify” group of text functions as the focus of this Level. Finally, he identifies and examines each functional member of the “Extract and Modify

★ ★ ★ ★ ★ ★ ★ ★ ★ ★

You rated this post out of 5. Change rating

2026-02-04

1,685 reads

External Article

INFO.VIEW DAX Functions Usage and Examples

  • Article

In the December 2023 Microsoft Power BI Desktop release, more than 50 new INFO DAX functions were added. They all start with “INFO.” and return the same result as corresponding data management views (DMVs) that were available before only using a SQL-like syntax. With these new DAX functions, you can use the recently added DAX query to get metadata about your semantic mode

2025-03-10

Stairway to DAX and Power BI

Level 27: Time Intelligence – Dates Functions: The DAX “Parallel Period” and “Same Period Last Year” Functions

  • Stairway Step

Business Intelligence Architect, “Analysis Services Maestro, and author Bill Pearson introduces two somewhat similar DAX Time Intelligence functions related to “parallel” Date periods: PARALLELPERIOD() and SAMEPERIODLASTYEAR(). He discusses the syntax, uses and operation of each function, and then provides hands-on exposure to it in Power BI.

★ ★ ★ ★ ★ ★ ★ ★ ★ ★

You rated this post out of 5. Change rating

2024-01-24

1,982 reads

Stairway to DAX and Power BI

Stairway to DAX and Power BI Level 26: Time Intelligence – Dates Functions: The DAX “Total to Date” Functions

  • Stairway Step

Business Intelligence Architect, Analysis Services Maestro, and author Bill Pearson introduces three similar DAX Time Intelligence functions related to Date: TOTALMTD(), TOTALQTD(), and TOTALMYD(). He discusses the syntax, uses and operation of each function, and then provides hands-on exposure to it in Power BI.

★ ★ ★ ★ ★ ★ ★ ★ ★ ★

(1)

You rated this post out of 5. Change rating

2023-09-27

1,037 reads

Stairway to DAX and Power BI

Stairway to DAX and Power BI Level 25: Time Intelligence – Dates Functions: The DAX CLOSINGBALANCE*() Functions

  • Stairway Step

Business Intelligence Architect, Analysis Services Maestro, and author Bill Pearson introduces three similar DAX Time Intelligence functions related to Date: CLOSINGBALANCEMONTH(), CLOSINGBALANCEQUARTER(), and CLOSINGBALANCEYEAR(). He discusses the syntax, uses and operation of each function, and then provides hands-on exposure to it in Power BI.

★ ★ ★ ★ ★ ★ ★ ★ ★ ★

(1)

You rated this post out of 5. Change rating

2023-08-30

938 reads

Stairway to DAX and Power BI

Level 24: Time Intelligence – Dates Functions: The DAX OPENINGBALANCE*() Functions

  • Stairway Step

Business Intelligence Architect, Analysis Services Maestro, and author Bill Pearson introduces three similar DAX Time Intelligence functions related to Date: OPENINGBALANCEMONTH(), OPENINGBALANCEQUARTER(). and OPENINGBALANCEYEAR(). He discusses the syntax, uses and operation of each function, and then provides hands-on exposure to it in Power BI.

★ ★ ★ ★ ★ ★ ★ ★ ★ ★

You rated this post out of 5. Change rating

2023-08-23

1,600 reads

Stairway to DAX and Power BI

Stairway to DAX and Power BI - Level 23: Time Intelligence – Dates Functions: The DAX PREVIOUS() Functions

  • Stairway Step

Business Intelligence Architect, Analysis Services Maestro, and author Bill Pearson introduces four very similar DAX Time Intelligence functions related to Date: PREVIOUSDAY(), PREVIOUSMONTH(). PREVIOUSQUARTER() and PREVIOUSYEAR(). He discusses the syntax, uses and operation of each function, and then provides hands-on exposure to it in Power BI.

★ ★ ★ ★ ★ ★ ★ ★ ★ ★

(2)

You rated this post out of 5. Change rating

2023-07-19

1,193 reads

Blogs

Goodbye, Microsoft

By

A few years ago I took a new job at Microsoft, working as a...

The SUM of Nothing: #SQLNewBlogger

By

I caught this interesting item over on Pinal Dave’s blog: Eleven Interview Questions that...

How to Move the SSMS Status Bar to the Top and Color-Code SQL Server Connections

By

I use color-coded connections in SSMS to distinguish Production, Pre-Production, UAT, and Development. But...

Read the latest Blogs

Forums

Today's AI

By Steve Jones - SSC Editor

Comments posted to this topic are about the item Today's AI

Split Large Queries in Athena with a Simple Modulo Trick

By Rahul Gupta

Comments posted to this topic are about the item Split Large Queries in Athena...

Finding Trailing Spaces

By Steve Jones - SSC Editor

Comments posted to this topic are about the item Finding Trailing Spaces

Visit the forum

Question of the Day

Finding Trailing Spaces

I have some data in a SQL Server 2025 database. It looks like this for the dbo.Customer table:

CustomerID CustomerName PreferredName
1          Steve        Steve               
2          Andy         Andy               
3          Brian        Brian               
4          Allan        Allan               
5          Devin        Devin               
6          Steve        Steve               
7          Sally        Sally
I want to detect which names have a single trailing space. The CustomerName is a varchar() and the PreferredName is a CHAR(). Does this query detect the problem rows?
SELECT 
       CustomerID,
       CustomerName,
       PreferredName
FROM Customer
WHERE CustomerName <> RTRIM(CustomerName)
OR PreferredName <> RTRIM(PreferredName);

See possible answers