cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
New Member

Creating a column with data from URLs

I'm pulling URL data from Google Analytics to view a list of least viewed pages. Since the data is so vast, even for a 90 day timeframe, I want to create a slicer to limit the data by category. I can pick the category out of the URL, but I'm having trouble setting up a good calculation. Here's an example of the URL list.

 

website.com/category

website.com/category.html

website.com/category/sub-page.html

 

And it goes on and on like that with category text varying in length and the delimiters that surround it. Setting a start and end delimiter doesn't seem like an option because the delimiters vary and just doing a range of text doesn't work either, since the text varies in lenghth. Any suggestions or corrections on my assumptions?

1 ACCEPTED SOLUTION
Community Support
Community Support

@kurtcollins ,

 

You may use code below to add a custom column.

Text.BetweenDelimiters(Text.Replace([Column1], ".html", "/"), "/", "/")
Community Support Team _ Sam Zha
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
Community Support
Community Support

@kurtcollins ,

 

You may use code below to add a custom column.

Text.BetweenDelimiters(Text.Replace([Column1], ".html", "/"), "/", "/")
Community Support Team _ Sam Zha
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Thanks! That worked.

Helpful resources

Announcements
secondImage

Experience what’s next for Power BI

Join us for an in-depth look at the new Power BI features and capabilities at the free Microsoft Business Applications Launch Event.

secondImage

Power BI Women

Join our monthly meetings and learning sessions.

secondImage

Congratulations!

We are excited to announce the Power BI Super Users!

secondImage

The largest Power BI virtual conference

100+ sessions, 100+ speakers, Product managers, MVPs, and experts. All about Power BI. Attend online or watch the recordings.

Top Solution Authors
Top Kudoed Authors