Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hi All,
Here's a small mock data set for a data source I am trying to clean. I need to separate the text into two separate columns, but "traditional" methods like using some basic text funtions and splitting by delimeter do not work.
I'm trying to split the column "Project Name" into two new columns:
Here are my issues:
The Challenge:
The EXTRA Challenge:
Thank you in advance for any or all insight you can offer to help me fix this very nitpicky issue!
Solved! Go to Solution.
Try using the below DAX to create columns:
Project Number = VAR v_hyphenPos = SEARCH( "-", Data[ProjectName], 1, 0) RETURN TRIM( LEFT( Data[ProjectName], v_hyphenPos-1 ) )
Project Name = VAR v_hyphenPos = SEARCH( "-", Data[ProjectName], 1, 0) RETURN TRIM( RIGHT( Data[ProjectName], (LEN(Data[ProjectName])-1) - (v_hyphenPos - 1 ) ) )
Thanks.
Try using the below DAX to create columns:
Project Number = VAR v_hyphenPos = SEARCH( "-", Data[ProjectName], 1, 0) RETURN TRIM( LEFT( Data[ProjectName], v_hyphenPos-1 ) )
Project Name = VAR v_hyphenPos = SEARCH( "-", Data[ProjectName], 1, 0) RETURN TRIM( RIGHT( Data[ProjectName], (LEN(Data[ProjectName])-1) - (v_hyphenPos - 1 ) ) )
Thanks.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
107 | |
94 | |
77 | |
63 | |
50 |
User | Count |
---|---|
147 | |
106 | |
104 | |
87 | |
61 |