Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
ShortKing
New Member

CONCATENATE SUBSTR DAX MEASURE

Hello, hope everyone had a good new years! Still a fairly new user to PBI, so help would be much appreciated!

 

I have used concatenate measure, but never with 4 other column formulas. How would this be translated from SQL to DAX measure?

 

DATE(SUBSTR(DIGITS(TABLE1),4,2) CONCAT '/' CONCAT SUBSTR(DIGITS(TABLE1),4,2) CONCAT '/ CONCAT SUBSTR(DIGITS(TABLE1),2,2)) AS MEASURE1

1 ACCEPTED SOLUTION
AlexisOlson
Super User
Super User

This would probably be better to do in PowerQuery than DAX but if you do need it in DAX, use MID instead of SUBSTR.

 

DATE (
	MID ( Table1[Col1], 1, 4 ),
	MID ( Table1[Col1], 5, 2 ),
	MID ( Table1[Col1], 7, 2 )
)

If Table1[Col1] = 20231231, then the above should output 12/31/2023 as a date. 

View solution in original post

1 REPLY 1
AlexisOlson
Super User
Super User

This would probably be better to do in PowerQuery than DAX but if you do need it in DAX, use MID instead of SUBSTR.

 

DATE (
	MID ( Table1[Col1], 1, 4 ),
	MID ( Table1[Col1], 5, 2 ),
	MID ( Table1[Col1], 7, 2 )
)

If Table1[Col1] = 20231231, then the above should output 12/31/2023 as a date. 

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.