Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago
Solved

Google Analytics and chart

Hi all
I am using Google Analytics to get the page views for 3 websites and i have a bar chart chart with the page view.

www.123.com
www.example.com
www.ABC.com

However for one of the website, www.ABC.com, i used the landing page and used conditional column
if "landing page" contain /mysistersite/ then Subdomain else www.ABC.com/mysistersite

How do i get the chart to display:

www.123.com
www.example.com
www.ABC.com
www.ABC.com/mysistersite


I can't show the file due to the data, hope someone can advice.
Thank you.

  • Hi Anonymous ,

     

    You could create a new column to get the result.

    Column 2 =
    VAR _search1 =
        SEARCH ( "/", 'Table'[Column1], 1, 0 )
    VAR num1 =
        IF ( _search1 = 0, 0, _search1 - 1 )
    VAR _search2 =
        RIGHT ( 'Table'[Column1], LEN ( 'Table'[Column1] ) - num1 - 1 )
    VAR _search3 =
        SEARCH ( "/", _search2, 1, 0 )
    RETURN
        IF ( _search3 = 0, 'Table'[Column1], LEFT ( 'Table'[Column1], num1 ) )

    Here is the result for your reference.

     

1 Reply

  • v-eachen-msft's avatar
    v-eachen-msft
    Community Support

    Hi Anonymous ,

     

    You could create a new column to get the result.

    Column 2 =
    VAR _search1 =
        SEARCH ( "/", 'Table'[Column1], 1, 0 )
    VAR num1 =
        IF ( _search1 = 0, 0, _search1 - 1 )
    VAR _search2 =
        RIGHT ( 'Table'[Column1], LEN ( 'Table'[Column1] ) - num1 - 1 )
    VAR _search3 =
        SEARCH ( "/", _search2, 1, 0 )
    RETURN
        IF ( _search3 = 0, 'Table'[Column1], LEFT ( 'Table'[Column1], num1 ) )

    Here is the result for your reference.