cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
kurtcollins Frequent Visitor
Frequent Visitor

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

Accepted Solutions
Community Support Team
Community Support Team

Re: Creating a column with data from URLs

@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 Team
Community Support Team

Re: Creating a column with data from URLs

@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

kurtcollins Frequent Visitor
Frequent Visitor

Re: Creating a column with data from URLs

Thanks! That worked.

Helpful resources

Announcements
Coming Soon: T-Shirt Design Contest

Coming Soon: T-Shirt Design Contest

Keep your eyes open for our upcoming T-shirt design contest!

Meet the 2020 Season 1 Power BI Super Users!

Meet the 2020 Season 1 Power BI Super Users!

It’s the start of a new Super User season! Learn all about the new Super Users and brand-new tiered recognition system.

Super User Challenge: Can You Solve These?

Super User Challenge: Can You Solve These?

We're celebrating the start of the New Super User season with our first ever Super User 'Can You Solve These?' challenge.

Power BI Desktop Update - February 2020

Power BI Desktop Update - February 2020

We are super excited for our update this month, as we are releasing two of our top community requests!

Power Platform Online Conference

Power Platform Online Conference

Join us for the first ever Power Platform Online Conference!

Top Solution Authors
Top Kudoed Authors