<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Trim URL string in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Trim-URL-string/m-p/2000526#M1221365</link>
    <description>&lt;P&gt;Hello John,&lt;/P&gt;
&lt;P&gt;I tried your solution with a similar issue but it still failed - not sure what I do wrong. In principle I like to achieve the very same as Wjtam206.&lt;/P&gt;
&lt;P&gt;But I need to replace anything from URL starting with the query parameters, which are indicated by "?" or "&amp;amp;". These could occur on any level of a URL, such as&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="http://www.homepage/?.." target="_blank"&gt;www.homepage/?..&lt;/A&gt;.&lt;/P&gt;
&lt;P&gt;&lt;A href="http://www.homepage/subpage1/&amp;amp;.." target="_blank"&gt;www.homepage/subpage1/&amp;amp;..&lt;/A&gt;.&lt;/P&gt;
&lt;P&gt;&lt;A href="http://www.homepage/subpage1/subpage2/?.." target="_blank"&gt;www.homepage/subpage1/subpage2/?..&lt;/A&gt;. and so forth&lt;/P&gt;
&lt;P&gt;And of course, if there is none of these, the full path should be returned.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Would you have an idea on how to get there?&lt;/P&gt;
&lt;P&gt;Many thanks in advance!&lt;/P&gt;
&lt;P&gt;Joerg&lt;/P&gt;</description>
    <pubDate>Fri, 04 Nov 2022 08:10:59 GMT</pubDate>
    <dc:creator>jblank</dc:creator>
    <dc:date>2022-11-04T08:10:59Z</dc:date>
    <item>
      <title>Trim URL string</title>
      <link>https://community.qlik.com/t5/QlikView/Trim-URL-string/m-p/98064#M757290</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a question trimming a URL string in qlik.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For example,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="1" class="jiveBorder" style="border: 1px solid rgb(0, 0, 0); width: 100%;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;Original URL&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;&lt;STRONG&gt;Desired URL Output&lt;/STRONG&gt;&lt;/TH&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;&lt;A href="https://www.affordablecollegesonline.org/degrees/mba-programs/#Types-of-Online-MBAs" title="https://www.affordablecollegesonline.org/degrees/mba-programs/#Types-of-Online-MBAs" target="_blank"&gt;https://www.affordablecollegesonline.org/degrees/mba-programs/#Types-of-Online-MBAs&lt;/A&gt;&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;&lt;A href="https://www.affordablecollegesonline.org/degrees/mba-programs/#Types-of-Online-MBAs" title="https://www.affordablecollegesonline.org/degrees/mba-programs/#Types-of-Online-MBAs" target="_blank"&gt;affordablecollegesonline.org/degrees/mba-programs&lt;/A&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;&lt;A href="https://www.topmanagementdegrees.com/rankings/cheapest-online-mba/" title="https://www.topmanagementdegrees.com/rankings/cheapest-online-mba/" target="_blank"&gt;https://www.topmanagementdegrees.com/rankings/cheapest-online-mba/&lt;/A&gt;&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;&lt;A href="https://www.topmanagementdegrees.com/rankings/cheapest-online-mba/" title="https://www.topmanagementdegrees.com/rankings/cheapest-online-mba/" target="_blank"&gt;topmanagementdegrees.com/rankings/cheapest-online-mba&lt;/A&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I want to remove&amp;nbsp; '&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://www" rel="nofollow" target="_blank"&gt;https://www&lt;/A&gt;&lt;SPAN&gt;.' and the last '/' in the string. Also, if they have '/#' in the string then remove everything after the '/#'. Any suggestions?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Nov 2020 16:16:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Trim-URL-string/m-p/98064#M757290</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-11-25T16:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: Trim URL string</title>
      <link>https://community.qlik.com/t5/QlikView/Trim-URL-string/m-p/98065#M757291</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, Wesley. Maybe something like this&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;SubField(Replace(If(Right(UrlString, 1) = '/', Left(UrlString, Len(UrlString)-1), UrlString), '&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://www" rel="nofollow" target="_blank"&gt;https://www&lt;/A&gt;&lt;SPAN&gt;.', ''), '/#', 1)&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Sep 2018 18:42:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Trim-URL-string/m-p/98065#M757291</guid>
      <dc:creator>andrey_krylov</dc:creator>
      <dc:date>2018-09-05T18:42:45Z</dc:date>
    </item>
    <item>
      <title>Re: Trim URL string</title>
      <link>https://community.qlik.com/t5/QlikView/Trim-URL-string/m-p/98066#M757292</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Andrey,&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;SPAN&gt;It worked for the most part. What if there are urls starting with '&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://www" rel="nofollow" target="_blank"&gt;http://www&lt;/A&gt;&lt;SPAN&gt;.' instead? Where would place it in the formula?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Sep 2018 18:57:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Trim-URL-string/m-p/98066#M757292</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-09-05T18:57:57Z</dc:date>
    </item>
    <item>
      <title>Re: Trim URL string</title>
      <link>https://community.qlik.com/t5/QlikView/Trim-URL-string/m-p/98067#M757293</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Maybe with this modification to Andrey's expression?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SubField(Replace(If(Right(SubField(UrlString,'://',2), 1) = '/', Left(SubField(UrlString,'://',2), Len(SubField(UrlString,'://',2))-1), SubField(UrlString,'://',2)), 'www.', ''), '/#', 1)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;HTH,&lt;/P&gt;&lt;P&gt;John&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Sep 2018 20:57:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Trim-URL-string/m-p/98067#M757293</guid>
      <dc:creator>johnca</dc:creator>
      <dc:date>2018-09-05T20:57:02Z</dc:date>
    </item>
    <item>
      <title>Re: Trim URL string</title>
      <link>https://community.qlik.com/t5/QlikView/Trim-URL-string/m-p/98068#M757294</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi John,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This actually works too! However, there are some URL strings in my table that are clean and have the desired URL output already. They are returned as null so how do I account for them as well? &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Sep 2018 21:21:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Trim-URL-string/m-p/98068#M757294</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-09-05T21:21:28Z</dc:date>
    </item>
    <item>
      <title>Re: Trim URL string</title>
      <link>https://community.qlik.com/t5/QlikView/Trim-URL-string/m-p/98069#M757295</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What do you mean by "clean and have the desired output already"?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please show some more examples of these, what you have and desired output.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Sep 2018 21:25:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Trim-URL-string/m-p/98069#M757295</guid>
      <dc:creator>johnca</dc:creator>
      <dc:date>2018-09-05T21:25:19Z</dc:date>
    </item>
    <item>
      <title>Re: Trim URL string</title>
      <link>https://community.qlik.com/t5/QlikView/Trim-URL-string/m-p/98070#M757296</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This is output from using your formula earlier,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="1" class="jiveBorder" style="border: 1px solid rgb(0, 0, 0); width: 100%;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;&lt;STRONG&gt;Original URL&lt;/STRONG&gt;&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;&lt;STRONG&gt;Output&lt;/STRONG&gt;&lt;/TH&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;&lt;A href="https://www.affordablecollegesonline.org/degrees/mba-programs/#Types-of-Online-MBAs" title="https://www.affordablecollegesonline.org/degrees/mba-programs/#Types-of-Online-MBAs"&gt;https://www.affordablecollegesonline.org/degrees/mba-programs/#Types-of-Online-MBAs&lt;/A&gt;&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;affordablecollegesonline.org/degrees/mba-programs&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;&lt;A href="https://www.topmanagementdegrees.com/rankings/cheapest-online-mba/" title="https://www.topmanagementdegrees.com/rankings/cheapest-online-mba/"&gt;https://www.topmanagementdegrees.com/rankings/cheapest-online-mba/&lt;/A&gt;&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;topmanagementdegrees.com/rankings/cheapest-online-mba&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;discoverbusiness.us/education/online-mba&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;- (Null)&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It works perfectly for URLs that need to be trimmed, like the first two URLs in the table. However, there are specific cases in my table where the URL was parsed already in the original URL column and returning nulls using your formula. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope this helps clarify the issue. Thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Sep 2018 21:34:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Trim-URL-string/m-p/98070#M757296</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-09-05T21:34:29Z</dc:date>
    </item>
    <item>
      <title>Re: Trim URL string</title>
      <link>https://community.qlik.com/t5/QlikView/Trim-URL-string/m-p/98071#M757297</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Starting to get a little crude, but seems to work;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If(Len(SubField(UrlString,'://',2))&amp;lt;1,UrlString,SubField(Replace(If(Right(SubField(UrlString,'://',2), 1) = '/', Left(SubField(UrlString,'://',2), Len(SubField(UrlString,'://',2))-1), SubField(UrlString,'://',2)), 'www.', ''), '/#', 1))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;HTH,&lt;/P&gt;&lt;P&gt;John&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Sep 2018 21:51:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Trim-URL-string/m-p/98071#M757297</guid>
      <dc:creator>johnca</dc:creator>
      <dc:date>2018-09-05T21:51:38Z</dc:date>
    </item>
    <item>
      <title>Re: Trim URL string</title>
      <link>https://community.qlik.com/t5/QlikView/Trim-URL-string/m-p/98072#M757298</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It works now. Thank you!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Sep 2018 22:36:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Trim-URL-string/m-p/98072#M757298</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-09-05T22:36:06Z</dc:date>
    </item>
    <item>
      <title>Re: Trim URL string</title>
      <link>https://community.qlik.com/t5/QlikView/Trim-URL-string/m-p/2000526#M1221365</link>
      <description>&lt;P&gt;Hello John,&lt;/P&gt;
&lt;P&gt;I tried your solution with a similar issue but it still failed - not sure what I do wrong. In principle I like to achieve the very same as Wjtam206.&lt;/P&gt;
&lt;P&gt;But I need to replace anything from URL starting with the query parameters, which are indicated by "?" or "&amp;amp;". These could occur on any level of a URL, such as&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="http://www.homepage/?.." target="_blank"&gt;www.homepage/?..&lt;/A&gt;.&lt;/P&gt;
&lt;P&gt;&lt;A href="http://www.homepage/subpage1/&amp;amp;.." target="_blank"&gt;www.homepage/subpage1/&amp;amp;..&lt;/A&gt;.&lt;/P&gt;
&lt;P&gt;&lt;A href="http://www.homepage/subpage1/subpage2/?.." target="_blank"&gt;www.homepage/subpage1/subpage2/?..&lt;/A&gt;. and so forth&lt;/P&gt;
&lt;P&gt;And of course, if there is none of these, the full path should be returned.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Would you have an idea on how to get there?&lt;/P&gt;
&lt;P&gt;Many thanks in advance!&lt;/P&gt;
&lt;P&gt;Joerg&lt;/P&gt;</description>
      <pubDate>Fri, 04 Nov 2022 08:10:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Trim-URL-string/m-p/2000526#M1221365</guid>
      <dc:creator>jblank</dc:creator>
      <dc:date>2022-11-04T08:10:59Z</dc:date>
    </item>
    <item>
      <title>Re: Trim URL string</title>
      <link>https://community.qlik.com/t5/QlikView/Trim-URL-string/m-p/2000938#M1221381</link>
      <description>&lt;P&gt;Hi Joerg,&lt;/P&gt;
&lt;P&gt;It's not clear to me what you need based on the truncated URL's you shared. Can you share the full URL's and expected outputs the same way the originator of this thread did?&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;JohnInSD&lt;/P&gt;
&lt;P&gt;(aka johncaqc)&lt;/P&gt;</description>
      <pubDate>Sat, 05 Nov 2022 18:21:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Trim-URL-string/m-p/2000938#M1221381</guid>
      <dc:creator>johnca</dc:creator>
      <dc:date>2022-11-05T18:21:19Z</dc:date>
    </item>
    <item>
      <title>Re: Trim URL string</title>
      <link>https://community.qlik.com/t5/QlikView/Trim-URL-string/m-p/2001086#M1221392</link>
      <description>&lt;P&gt;Hello Again,&lt;/P&gt;
&lt;P&gt;I believe I got there myself:&lt;/P&gt;
&lt;P&gt;=IF(SubStringCount(&lt;SPAN&gt;UrlString&lt;/SPAN&gt;,'?')&amp;gt;0,LEFT(SubField(&lt;SPAN&gt;UrlString&lt;/SPAN&gt;,'?',1),Len(&lt;SPAN&gt;UrlString&lt;/SPAN&gt;)),IF(SubStringCount([GA_ZI_Sessions.DataFromQueryURI_dim_pagePath],'&amp;amp;')&amp;gt;0,LEFT(SubField(&lt;SPAN&gt;UrlString&lt;/SPAN&gt;,'&amp;amp;',1),Len(&lt;SPAN&gt;UrlString&lt;/SPAN&gt;)),&lt;SPAN&gt;UrlString&lt;/SPAN&gt;))&lt;/P&gt;
&lt;P&gt;Best Regards&lt;/P&gt;
&lt;P&gt;Joerg&lt;/P&gt;</description>
      <pubDate>Mon, 07 Nov 2022 09:01:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Trim-URL-string/m-p/2001086#M1221392</guid>
      <dc:creator>jblank</dc:creator>
      <dc:date>2022-11-07T09:01:07Z</dc:date>
    </item>
  </channel>
</rss>

