<?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: Calculated Dimension in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Calculated-Dimension/m-p/1595268#M737287</link>
    <description>Yes it will handle more and fewer words.&lt;BR /&gt;&lt;BR /&gt;I believe that this approach will have a better prestanda than the&lt;BR /&gt;suggested calculated dimension approach.&lt;BR /&gt;&lt;BR /&gt;Vegar&lt;BR /&gt;</description>
    <pubDate>Mon, 24 Jun 2019 17:36:05 GMT</pubDate>
    <dc:creator>Vegar</dc:creator>
    <dc:date>2019-06-24T17:36:05Z</dc:date>
    <item>
      <title>Calculated Dimension</title>
      <link>https://community.qlik.com/t5/QlikView/Calculated-Dimension/m-p/1595132#M737284</link>
      <description>&lt;P&gt;Having some trouble getting this right. I have used Calculated dimensions before, but this dimension I am using could have several dimensions/attributes inside the field.&lt;/P&gt;&lt;P&gt;Let's say I would like to create a calculated dimension based on the below attributes. Each "word" represents one attribute for the particular order. So, the first row has three attributes on the order. MEDIA, ATC, and HH (never mind what they mean). The 5 remaining also have MEDIA as an attribute.&amp;nbsp;&lt;/P&gt;&lt;P&gt;MEDIA ATC HH&lt;BR /&gt;MEDIA ATC HH VR&lt;BR /&gt;MEDIA ATC HH XFLO VR&lt;BR /&gt;MEDIA ATC HHR VR&lt;BR /&gt;MEDIA ATC HHR XFLO VR&lt;BR /&gt;MEDIA ATC PT ADB HHR VR B2B&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;So I would like to return the following number for each attribute:&lt;/P&gt;&lt;P&gt;ADB: 1&lt;/P&gt;&lt;P&gt;ATC: 6&lt;/P&gt;&lt;P&gt;B2B: 1&lt;/P&gt;&lt;P&gt;HH: 3&lt;/P&gt;&lt;P&gt;HHR: 3&lt;/P&gt;&lt;P&gt;MEDIA: 6&lt;/P&gt;&lt;P&gt;PT: 1&lt;/P&gt;&lt;P&gt;VR: 5&lt;/P&gt;&lt;P&gt;XFLO: 2&lt;/P&gt;&lt;P&gt;I tried the following script, but it didn't work as I wanted:&lt;/P&gt;&lt;P&gt;=(if(wildmatch(Addition,'*ADB*'),'ADB '))&lt;BR /&gt;&amp;amp; (if(wildmatch(Addition,'*ATC*'),'ATC '))&lt;BR /&gt;&amp;amp; (if(wildmatch(Addition,'*B2B*'),'B2B '))&lt;BR /&gt;&amp;amp; (if(wildmatch(Addition,'*HH*'),'HH '))&lt;BR /&gt;&amp;amp; (if(wildmatch(Addition,'*HHR*'),'HHR '))&lt;BR /&gt;&amp;amp; (if(wildmatch(Addition,'*MEDIA*'),'MEDIA '))&lt;BR /&gt;&amp;amp; (if(wildmatch(Addition,'*PT*'),'PT '))&lt;BR /&gt;&amp;amp; (if(wildmatch(Addition,'*VR*'),'VR '))&lt;BR /&gt;&amp;amp; (if(wildmatch(Addition,'*XFLO*'),'XFLO '))&lt;/P&gt;</description>
      <pubDate>Wed, 25 Nov 2020 16:16:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculated-Dimension/m-p/1595132#M737284</guid>
      <dc:creator>MEJ</dc:creator>
      <dc:date>2020-11-25T16:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: Calculated Dimension</title>
      <link>https://community.qlik.com/t5/QlikView/Calculated-Dimension/m-p/1595229#M737285</link>
      <description>&lt;P&gt;An alternative solution is to adjust your datamodel in such a way that you have the words as a real dimension. Like in the script below.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="php"&gt;Data:
LOAD Words, Words as %word inline [
Words
MEDIA ATC HH
MEDIA ATC HH VR
MEDIA ATC HH XFLO VR
MEDIA ATC HHR VR
MEDIA ATC HHR XFLO VR
MEDIA ATC PT ADB HHR VR B2B];


Words:
LOAD 
	%word,
	subfield(Words, ' ') as Word
RESIDENT Data;
exit script&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="image.png" style="width: 538px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/14288i27B18FCDCEAB7910/image-size/large?v=v2&amp;amp;px=999" role="button" title="image.png" alt="image.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 24 Jun 2019 15:12:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculated-Dimension/m-p/1595229#M737285</guid>
      <dc:creator>Vegar</dc:creator>
      <dc:date>2019-06-24T15:12:30Z</dc:date>
    </item>
    <item>
      <title>Re: Calculated Dimension</title>
      <link>https://community.qlik.com/t5/QlikView/Calculated-Dimension/m-p/1595236#M737286</link>
      <description>&lt;P&gt;Thank you.&lt;/P&gt;&lt;P&gt;Now I only gave an extract of combinations. There could be many hundreds of combinations like this, and there will never be a one size fits all solution. As I have 21 attributes, which means there could be theoretically hundreds of thousands of combinations, maybe millions (haven't made the calculation of total possible combinations). It must be a solution where I don't have to pre-define possible combinations. Would this solution handle that?&lt;/P&gt;&lt;P&gt;/Mathias&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 24 Jun 2019 15:18:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculated-Dimension/m-p/1595236#M737286</guid>
      <dc:creator>MEJ</dc:creator>
      <dc:date>2019-06-24T15:18:13Z</dc:date>
    </item>
    <item>
      <title>Re: Calculated Dimension</title>
      <link>https://community.qlik.com/t5/QlikView/Calculated-Dimension/m-p/1595268#M737287</link>
      <description>Yes it will handle more and fewer words.&lt;BR /&gt;&lt;BR /&gt;I believe that this approach will have a better prestanda than the&lt;BR /&gt;suggested calculated dimension approach.&lt;BR /&gt;&lt;BR /&gt;Vegar&lt;BR /&gt;</description>
      <pubDate>Mon, 24 Jun 2019 17:36:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculated-Dimension/m-p/1595268#M737287</guid>
      <dc:creator>Vegar</dc:creator>
      <dc:date>2019-06-24T17:36:05Z</dc:date>
    </item>
    <item>
      <title>Re: Calculated Dimension</title>
      <link>https://community.qlik.com/t5/QlikView/Calculated-Dimension/m-p/1595585#M737288</link>
      <description>&lt;P&gt;I will see if I can understand how to insert that script into my load script and make it work.&amp;nbsp;&lt;/P&gt;&lt;P&gt;What does the % sign do?&lt;/P&gt;&lt;P&gt;Could you explain in words that the script is doing?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 25 Jun 2019 11:24:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculated-Dimension/m-p/1595585#M737288</guid>
      <dc:creator>MEJ</dc:creator>
      <dc:date>2019-06-25T11:24:11Z</dc:date>
    </item>
    <item>
      <title>Re: Calculated Dimension</title>
      <link>https://community.qlik.com/t5/QlikView/Calculated-Dimension/m-p/1595879#M737289</link>
      <description>The % does nothing, it is just as any other character, I usually put % in&lt;BR /&gt;front of field names that are linking tables together.&lt;BR /&gt;&lt;BR /&gt;What I do is creating a additional dimension linked to the field containing&lt;BR /&gt;the word collections. In the new dimension table for each word collection I&lt;BR /&gt;create a row per word using SubFields() without a third parameter.&lt;BR /&gt;&lt;BR /&gt;Read about SubFields here:&lt;BR /&gt;&lt;A href="https://help.qlik.com/en-US/qlikview/April2019/Subsystems/Client/Content/QV_QlikView/Scripting/StringFunctions/SubField.htm" target="_blank"&gt;https://help.qlik.com/en-US/qlikview/April2019/Subsystems/Client/Content/QV_QlikView/Scripting/StringFunctions/SubField.htm&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 25 Jun 2019 19:10:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculated-Dimension/m-p/1595879#M737289</guid>
      <dc:creator>Vegar</dc:creator>
      <dc:date>2019-06-25T19:10:05Z</dc:date>
    </item>
  </channel>
</rss>

