Join us for an expert-led overview of the tools and concepts you'll need to pass exam PL-300. The first session starts on June 11th. See you there!
Get registeredPower BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.
Hello!
I am new to the community and hoping for some help! In the column below, I only want to extract the text that comes after '- ' and before ' -' for the entire column of values. Please can you help with DAX calculation? I am unable to use PowerQuery for various reasons.
EDPC - 2023.Q1 - DP (want to extract 2023.Q1)
LRM - 2023.1 - UG - DP (want to extract 2023.1)
LRCM - 2022.2 - PG - DP (want to extract 2022.2)
Thank you for your help!
Solved! Go to Solution.
Please try
Column2 =
VAR String = 'Table'[Column1]
VAR Items =
SUBSTITUTE ( String, " - ", "|" )
RETURN
PATHITEM ( Items, 2 )
Column2 =
VAR String = 'Table'[Column1]
VAR Items =
SUBSTITUTE ( String, " - ", "|" )
VAR Length =
COALESCE ( PATHLENGTH ( Items ), 1 )
RETURN
PATHITEM ( Items, Length )
Thank you so much for the fast response! @tamerj1
Can you confirm how I can modify the DAX to only extract the characters after '- ' also?
EDPC - 2023.Q1 - DP (want to extract DP)
LRM - 2023.1 - UG - DP (want to extract DP)
LRCM - 2022.2 - PG - DP (want to extract DP)
Column2 =
VAR String = 'Table'[Column1]
VAR Items =
SUBSTITUTE ( String, " - ", "|" )
VAR Length =
COALESCE ( PATHLENGTH ( Items ), 1 )
RETURN
PATHITEM ( Items, Length )
Please try
Column2 =
VAR String = 'Table'[Column1]
VAR Items =
SUBSTITUTE ( String, " - ", "|" )
RETURN
PATHITEM ( Items, 2 )
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
15 | |
11 | |
11 | |
10 | |
10 |
User | Count |
---|---|
19 | |
14 | |
14 | |
11 | |
8 |