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
MTME
Helper I
Helper I

Creating a new column from existing column with applied text filter

Hi,

 

I'm trying to make a model that shows website traffic across all language versions of our website, using the Google Analytics conncetor, but the traffic data that I get in from Google Analytics contain both our global site's page data, as well as the various languages pages in the same dataset. 

 

So, what I was thinking to do was have one column that contains all data, and then calculate new columns for each subdomain, so that they can be discerned from each other in models. 

 

However, I'm not sure how to achieve this.

1 ACCEPTED SOLUTION
MTME
Helper I
Helper I

I was able to find a solution that could somewhat do the same as what I was looking for. By creating a conditional column based on the original Page column, I could create a column which would replace any URL with for example /de to DE as a text string, and the same for /fr pages to FR, and so on.

By doing this I now have a column with all DE, FR, ES, etc. that I can use to filter for all pages related to their individual subdomain.

View solution in original post

4 REPLIES 4
MTME
Helper I
Helper I

I was able to find a solution that could somewhat do the same as what I was looking for. By creating a conditional column based on the original Page column, I could create a column which would replace any URL with for example /de to DE as a text string, and the same for /fr pages to FR, and so on.

By doing this I now have a column with all DE, FR, ES, etc. that I can use to filter for all pages related to their individual subdomain.

amitchandak
Super User
Super User

@MTME ,Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.

@amitchandak I have created a table here with some sample data:

PageSessions

Date

/10

12-06-2019

/test3

16-07-2019

/test/example1

16-07-2019

/de5

12-06-2019

/de/example2

14-06-2019

/fr6

12-06-2019

/fr/example2

16-07-2019

What we have here is some pages across different language domains (i.e. /fr and /de), but if possible I would like to create new columns or measures that filter so that it only shows for example the pages that begin with/contain /de
So, that I can create models that shows for example sessions from only the German (/de) website

hi @MTME 

You may use Extract in edit queries to get it as below:

1.JPG

https://www.wiseowl.co.uk/blog/s2535/text-between-delimiters.htm

 

 

Regards,

Lin

Community Support Team _ Lin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

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.