<?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: Scripting / Transformation Question in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Scripting-Transformation-Question/m-p/2443780#M97533</link>
    <description>&lt;P&gt;Thanks &lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/6622"&gt;@hic&lt;/a&gt;&amp;nbsp;(and great to have the pleasure again &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt; ), but (and i should have said this) this will only work as long as the possible risks (in table Risks) dont change (i.e. a new risk is added). If that happens i'd need to add an additional measure to my table, correct ?&lt;/P&gt;
&lt;P&gt;I would prefer to go the transform way and create a table as described in the Result table.&lt;/P&gt;</description>
    <pubDate>Tue, 23 Apr 2024 07:27:58 GMT</pubDate>
    <dc:creator>xyz_1011</dc:creator>
    <dc:date>2024-04-23T07:27:58Z</dc:date>
    <item>
      <title>Scripting / Transformation Question</title>
      <link>https://community.qlik.com/t5/App-Development/Scripting-Transformation-Question/m-p/2443767#M97531</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;
&lt;P&gt;i have the following two tables:&lt;BR /&gt;&lt;BR /&gt;Contracts:&lt;/P&gt;
&lt;TABLE border="1" width="100%"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD width="25%"&gt;ContractID&lt;/TD&gt;
&lt;TD width="25%"&gt;Valid_From&lt;/TD&gt;
&lt;TD width="25%"&gt;Valid_To&lt;/TD&gt;
&lt;TD width="25%"&gt;Risk&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="25%"&gt;123&lt;/TD&gt;
&lt;TD width="25%"&gt;2003-01-01&lt;/TD&gt;
&lt;TD width="25%"&gt;2003-12-31&lt;/TD&gt;
&lt;TD width="25%"&gt;A&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="25%"&gt;123&lt;/TD&gt;
&lt;TD width="25%"&gt;2003-01-01&lt;/TD&gt;
&lt;TD width="25%"&gt;2003-12-31&lt;/TD&gt;
&lt;TD width="25%"&gt;B&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="25%"&gt;123&lt;/TD&gt;
&lt;TD width="25%"&gt;2003-01-01&lt;/TD&gt;
&lt;TD width="25%"&gt;2003-12-31&lt;/TD&gt;
&lt;TD width="25%"&gt;C&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="25%"&gt;123&lt;/TD&gt;
&lt;TD width="25%"&gt;2004-01-01&lt;/TD&gt;
&lt;TD width="25%"&gt;2004-12-31&lt;/TD&gt;
&lt;TD width="25%"&gt;B&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="25%"&gt;123&lt;/TD&gt;
&lt;TD width="25%"&gt;2004-01-01&lt;/TD&gt;
&lt;TD width="25%"&gt;2004-12-31&lt;/TD&gt;
&lt;TD width="25%"&gt;E&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Risks:&lt;/P&gt;
&lt;TABLE border="1" width="100%"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD width="50%"&gt;Risk&lt;/TD&gt;
&lt;TD width="50%"&gt;Risk_Name&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;A&lt;/TD&gt;
&lt;TD&gt;Risk_A&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;B&lt;/TD&gt;
&lt;TD&gt;Risk_B&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;C&lt;/TD&gt;
&lt;TD&gt;Risk_C&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;D&lt;/TD&gt;
&lt;TD&gt;Risk_D&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;E&lt;/TD&gt;
&lt;TD&gt;Risk_E&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am seeking a way to transform the two table into one table with the following structure:&lt;/P&gt;
&lt;P&gt;Result:&lt;/P&gt;
&lt;TABLE border="1" width="88.8888888888889%"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD width="11.11111111111111%"&gt;ContractID&lt;/TD&gt;
&lt;TD width="11.11111111111111%"&gt;Valid_From&lt;/TD&gt;
&lt;TD width="11.11111111111111%"&gt;Valid_To&lt;/TD&gt;
&lt;TD width="11.11111111111111%"&gt;Has_Risk_A&lt;/TD&gt;
&lt;TD width="11.11111111111111%"&gt;Has_Risk_B&lt;/TD&gt;
&lt;TD width="11.11111111111111%"&gt;Has_Risk_C&lt;/TD&gt;
&lt;TD width="11.11111111111111%"&gt;Has_Risk_D&lt;/TD&gt;
&lt;TD width="11.11111111111111%"&gt;Has_Risk_E&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="11.11111111111111%"&gt;123&lt;/TD&gt;
&lt;TD width="11.11111111111111%"&gt;2003-01-01&lt;/TD&gt;
&lt;TD width="11.11111111111111%"&gt;2003-12-31&lt;/TD&gt;
&lt;TD width="11.11111111111111%"&gt;Yes&lt;/TD&gt;
&lt;TD width="11.11111111111111%"&gt;Yes&lt;/TD&gt;
&lt;TD width="11.11111111111111%"&gt;Yes&lt;/TD&gt;
&lt;TD width="11.11111111111111%"&gt;No&lt;/TD&gt;
&lt;TD width="11.11111111111111%"&gt;No&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="11.11111111111111%"&gt;123&lt;/TD&gt;
&lt;TD width="11.11111111111111%"&gt;2004-01-01&lt;/TD&gt;
&lt;TD width="11.11111111111111%"&gt;2004-12-31&lt;/TD&gt;
&lt;TD width="11.11111111111111%"&gt;No&lt;/TD&gt;
&lt;TD width="11.11111111111111%"&gt;No&lt;/TD&gt;
&lt;TD width="11.11111111111111%"&gt;No&lt;/TD&gt;
&lt;TD width="11.11111111111111%"&gt;Yes&lt;/TD&gt;
&lt;TD width="11.11111111111111%"&gt;Yes&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Of course the Contract table contains multiple ContractIDs with different periods. I am aiming for a result table that contains for every given Valid_From / Valid_To the information whether any of the possible risks is included.&lt;/P&gt;
&lt;P&gt;Thanks in advance for some help here!&lt;/P&gt;</description>
      <pubDate>Tue, 23 Apr 2024 06:57:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Scripting-Transformation-Question/m-p/2443767#M97531</guid>
      <dc:creator>xyz_1011</dc:creator>
      <dc:date>2024-04-23T06:57:44Z</dc:date>
    </item>
    <item>
      <title>Re: Scripting / Transformation Question</title>
      <link>https://community.qlik.com/t5/App-Development/Scripting-Transformation-Question/m-p/2443777#M97532</link>
      <description>&lt;P&gt;No transformation is needed. Just load the first table, and then create a straight table with the following:&lt;/P&gt;
&lt;P&gt;Dimensions:&amp;nbsp;ContractID, Valid_From, Valid_To&lt;/P&gt;
&lt;P&gt;Measures:&lt;BR /&gt;Has_Risk_A: If(Count({&amp;lt;Risk={A}&amp;gt;} ContractID)&amp;gt;0,'Yes','No')&lt;BR /&gt;Has_Risk_B: If(Count({&amp;lt;Risk={B}&amp;gt;} ContractID)&amp;gt;0,'Yes','No')&lt;BR /&gt;Has_Risk_C: If(Count({&amp;lt;Risk={C}&amp;gt;} ContractID)&amp;gt;0,'Yes','No')&lt;BR /&gt;Has_Risk_D: If(Count({&amp;lt;Risk={D}&amp;gt;} ContractID)&amp;gt;0,'Yes','No')&lt;BR /&gt;Has_Risk_E: If(Count({&amp;lt;Risk={E}&amp;gt;} ContractID)&amp;gt;0,'Yes','No')&lt;/P&gt;</description>
      <pubDate>Tue, 23 Apr 2024 07:23:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Scripting-Transformation-Question/m-p/2443777#M97532</guid>
      <dc:creator>hic</dc:creator>
      <dc:date>2024-04-23T07:23:02Z</dc:date>
    </item>
    <item>
      <title>Re: Scripting / Transformation Question</title>
      <link>https://community.qlik.com/t5/App-Development/Scripting-Transformation-Question/m-p/2443780#M97533</link>
      <description>&lt;P&gt;Thanks &lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/6622"&gt;@hic&lt;/a&gt;&amp;nbsp;(and great to have the pleasure again &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt; ), but (and i should have said this) this will only work as long as the possible risks (in table Risks) dont change (i.e. a new risk is added). If that happens i'd need to add an additional measure to my table, correct ?&lt;/P&gt;
&lt;P&gt;I would prefer to go the transform way and create a table as described in the Result table.&lt;/P&gt;</description>
      <pubDate>Tue, 23 Apr 2024 07:27:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Scripting-Transformation-Question/m-p/2443780#M97533</guid>
      <dc:creator>xyz_1011</dc:creator>
      <dc:date>2024-04-23T07:27:58Z</dc:date>
    </item>
    <item>
      <title>Re: Scripting / Transformation Question</title>
      <link>https://community.qlik.com/t5/App-Development/Scripting-Transformation-Question/m-p/2443787#M97534</link>
      <description>&lt;P&gt;True.&lt;/P&gt;
&lt;P&gt;For a real transform, you can use Generic Load. See&amp;nbsp;&lt;A href="https://community.qlik.com/t5/Design/The-Generic-Load/ba-p/1473470" target="_blank" rel="noopener"&gt;https://community.qlik.com/t5/Design/The-Generic-Load/ba-p/1473470&lt;/A&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you consider "Risk" as the Attribute and 'Yes' as the value, you would get pretty much what you want.&lt;/P&gt;</description>
      <pubDate>Tue, 23 Apr 2024 07:36:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Scripting-Transformation-Question/m-p/2443787#M97534</guid>
      <dc:creator>hic</dc:creator>
      <dc:date>2024-04-23T07:36:20Z</dc:date>
    </item>
  </channel>
</rss>

