<?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: switch case subfield delimiter count dependant in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/switch-case-subfield-delimiter-count-dependant/m-p/888938#M309794</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hey Gysbert,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for the reply.. In this case the subfields are not always in the same position&amp;nbsp; as the customers have different user(rights) types. The position of the module can differ or it may occur that there is no module present.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The main challenge I think I have is that for example if there are 4 or more positions, then the last position is the article-page, but there are cases that the last position is not an article but the module page. It depends on how extended the module can be and the type of user.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As you can see the can see the url can contain a module or no module and the last position can be an article, module and or a sub-module)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="" class="jive-image image-1" height="247" src="https://community.qlik.com/legacyfs/online/86994_pastedImage_0.png" style="width: 551px; height: 247.061px;" width="551" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So I think I'm looking at multiple if statements.. Is that even possible and would it be the correct way to go? &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 20 May 2015 11:16:42 GMT</pubDate>
    <dc:creator />
    <dc:date>2015-05-20T11:16:42Z</dc:date>
    <item>
      <title>switch case subfield delimiter count dependant</title>
      <link>https://community.qlik.com/t5/QlikView/switch-case-subfield-delimiter-count-dependant/m-p/888936#M309792</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hey guys,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm working on an assignment for my internship and I've encountered a challenge.&lt;/P&gt;&lt;P&gt;I'm working with Google Analytics(GA) data and I have to distinguish between the different customers, the types of users, modules, articles, etc.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The GA data consists the url's(for now)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The url's containt the delimiter '/' and can vary per customer and per user type.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The lengt of the url's also vary and in order to be able to break down the url's properly for analysis I want to be able to switch between the Subfield structure according to the frequency count of '/'(url length)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My question(s): Is this the proper way to go by such an assignment and how can I switch between how QV structures and processes the url data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;GoogleAnalyticsConnectorV3_DataFromQueryURI:&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt;*,&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;If(Match(frequency, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10),&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: #575757;"&gt;If(frequency == 5, &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Lower (SubField(DataFromQueryURI_dim_pagePath, '/', 2)) as klant,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Lower (SubField(DataFromQueryURI_dim_pagePath, '/', 3)) as module,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Lower (SubField(DataFromQueryURI_dim_pagePath, '/', 4)) as artikel,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Lower (SubField(DataFromQueryURI_dim_pagePath, '/', 5)) as artikel2;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;)&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; //dim_pagePath as PagePath,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; //metric_pageviews as Pageviews&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; DataFromQueryURI_dim_pagePath,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; SubStringCount(DataFromQueryURI_dim_pagePath, '/') as frequency&lt;/P&gt;&lt;P&gt;FROM&lt;/P&gt;&lt;P&gt;&lt;C&gt; (qvx);&lt;/C&gt;&lt;/P&gt;&lt;H1&gt;&lt;/H1&gt;&lt;P&gt;So basically if the delimiter count is 1 then subfield 2 is klant&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if the delimiter count is 2 then subfield 2 is klant and 3 is module&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; etc.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Greetings,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Robert&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 May 2015 14:31:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/switch-case-subfield-delimiter-count-dependant/m-p/888936#M309792</guid>
      <dc:creator />
      <dc:date>2015-05-19T14:31:45Z</dc:date>
    </item>
    <item>
      <title>Re: switch case subfield delimiter count dependant</title>
      <link>https://community.qlik.com/t5/QlikView/switch-case-subfield-delimiter-count-dependant/m-p/888937#M309793</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If the subfields like klant, module etc are always in the same position if they exist then you don't need to count the delimiters. Simply use the subfield expressions as they are. If there's no value for the nth subfield then it'll return a null.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 20 May 2015 09:05:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/switch-case-subfield-delimiter-count-dependant/m-p/888937#M309793</guid>
      <dc:creator>Gysbert_Wassenaar</dc:creator>
      <dc:date>2015-05-20T09:05:58Z</dc:date>
    </item>
    <item>
      <title>Re: switch case subfield delimiter count dependant</title>
      <link>https://community.qlik.com/t5/QlikView/switch-case-subfield-delimiter-count-dependant/m-p/888938#M309794</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hey Gysbert,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for the reply.. In this case the subfields are not always in the same position&amp;nbsp; as the customers have different user(rights) types. The position of the module can differ or it may occur that there is no module present.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The main challenge I think I have is that for example if there are 4 or more positions, then the last position is the article-page, but there are cases that the last position is not an article but the module page. It depends on how extended the module can be and the type of user.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As you can see the can see the url can contain a module or no module and the last position can be an article, module and or a sub-module)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="" class="jive-image image-1" height="247" src="https://community.qlik.com/legacyfs/online/86994_pastedImage_0.png" style="width: 551px; height: 247.061px;" width="551" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So I think I'm looking at multiple if statements.. Is that even possible and would it be the correct way to go? &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 20 May 2015 11:16:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/switch-case-subfield-delimiter-count-dependant/m-p/888938#M309794</guid>
      <dc:creator />
      <dc:date>2015-05-20T11:16:42Z</dc:date>
    </item>
    <item>
      <title>Re: switch case subfield delimiter count dependant</title>
      <link>https://community.qlik.com/t5/QlikView/switch-case-subfield-delimiter-count-dependant/m-p/888939#M309795</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Your preceding load structure is OK. In the preceding load, you will need something like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; Example, if the substring count is 1, 2, 3, then klant is in field 2; if the count is 4 or 4, klant is in field3,&lt;/P&gt;&lt;P&gt;otherwise klant is in field 4:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Lower(&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; If(Match(frequency, 1, 2, 3),&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; SubField(DataFromQueryURI_dim_pagePath, '/', 2),&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; If(Match(frequency, 4, 5),&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; SubField(DataFromQueryURI_dim_pagePath, '/', 3),&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; SubField(DataFromQueryURI_dim_pagePath, '/', 4)&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; )&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; )&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;) As klant,&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Repeat for each of the other variable position fields.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 20 May 2015 11:36:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/switch-case-subfield-delimiter-count-dependant/m-p/888939#M309795</guid>
      <dc:creator>jonathandienst</dc:creator>
      <dc:date>2015-05-20T11:36:23Z</dc:date>
    </item>
    <item>
      <title>Re: switch case subfield delimiter count dependant</title>
      <link>https://community.qlik.com/t5/QlikView/switch-case-subfield-delimiter-count-dependant/m-p/888940#M309796</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hey Jonathan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Many Thanks for your reply.. This will help me on my way&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 May 2015 06:26:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/switch-case-subfield-delimiter-count-dependant/m-p/888940#M309796</guid>
      <dc:creator />
      <dc:date>2015-05-21T06:26:39Z</dc:date>
    </item>
  </channel>
</rss>

