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

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.

Reply
khetiwer
New Member

using a calculated column in a calculated column

Hello.

 

I am working with a very large file to try to parse a column that has path strings like the following: /text/text/text/

The number of subsections for each path varies, and the length of the text inside the subsections vary. I was able to easily parse the first section by using 'find' and 'left' functions. However when I try to get to the second section using 'find' and 'mid' functions, it will not let me use the calculated column that I created to get the first section inside the new calculated column so that I know the starting point and end point of the mid functions. If I change the start and end to raw numbers, the function works. But because the path is varied, I need to have a dynamic start and end for my mid functions. 

 

I even tried to do a 'copy, paste value' like in excel, but there is of course no paste function. Any help would be greatly appreciated!!

2 ACCEPTED SOLUTIONS
Ashish_Mathur
Super User
Super User

Hi,

 

Just use the Split column feature in the Query Editor.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

View solution in original post

ryan_mayu
Super User
Super User

@khetiwer

 

Ashish provided you a good solution. If you only want to get a part of you text, you can try below coding.

Column = 
VAR first=FIND("/",Sheet2[test],1)
VAR second=FIND("/",Sheet2[test],first+1)
VAR thrid =FIND("/",Sheet2[test],second+1)
return MID(Sheet2[test],second+1,thrid-second-1)

c1.JPG

 





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




View solution in original post

3 REPLIES 3
ryan_mayu
Super User
Super User

@khetiwer

 

Ashish provided you a good solution. If you only want to get a part of you text, you can try below coding.

Column = 
VAR first=FIND("/",Sheet2[test],1)
VAR second=FIND("/",Sheet2[test],first+1)
VAR thrid =FIND("/",Sheet2[test],second+1)
return MID(Sheet2[test],second+1,thrid-second-1)

c1.JPG

 





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Ashish_Mathur
Super User
Super User

Hi,

 

Just use the Split column feature in the Query Editor.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Thank you both so so much! I have never used PowerBI to manipulate data tables, and only here because the file was too large for Excel. 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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