<?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: Create status field in load based on four separate fields in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Create-status-field-in-load-based-on-four-separate-fields/m-p/694679#M1056415</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Robert,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2 ways I can think of:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. Nested if statements :&lt;/P&gt;&lt;P&gt;ie:&lt;/P&gt;&lt;P&gt;if(Phase1='X', 'CREATED',&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; if(Phase2='X', 'RELEASED')) as STATUS&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. Multiple loads and concatenate&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MainTable:&lt;/P&gt;&lt;P&gt;LOAD &lt;/P&gt;&lt;P&gt;&amp;nbsp; field1&lt;/P&gt;&lt;P&gt;&amp;nbsp; ,field2&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;&amp;nbsp; ,'CREATED' as STATUS&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;FROM SOMETABLE&lt;/P&gt;&lt;P&gt;WHERE Phase1='X';&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Concatenate(MainTable)&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;LOAD &lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;&amp;nbsp; field1&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;&amp;nbsp; ,field2&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;&lt;SPAN style="font-size: 10pt;"&gt;&amp;nbsp; ,'&lt;SPAN style="font-size: 13.3333330154419px;"&gt;RELEASED&lt;/SPAN&gt;' as STATUS&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;FROM SOMETABLE&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;WHERE Phase2='X';&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;The nested if statement might be easiest.&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;Hope this helps.&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;Mark&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;www.techstuffy.com&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 24 Oct 2014 20:57:39 GMT</pubDate>
    <dc:creator>markodonovan</dc:creator>
    <dc:date>2014-10-24T20:57:39Z</dc:date>
    <item>
      <title>Create status field in load based on four separate fields</title>
      <link>https://community.qlik.com/t5/QlikView/Create-status-field-in-load-based-on-four-separate-fields/m-p/694677#M1056413</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have 4 fields in a table I'm loading, the fields are called:&lt;/P&gt;&lt;P&gt;&amp;nbsp; PHASE1&lt;/P&gt;&lt;P&gt;&amp;nbsp; PHASE2&lt;/P&gt;&lt;P&gt;&amp;nbsp; PHASE3&lt;/P&gt;&lt;P&gt;&amp;nbsp; PHASE4&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The fields are mutually-exclusive; one of them will always contain an 'X' while the other three will be blank.&amp;nbsp; I'd like to create one field called STATUS that would have the following values:&lt;/P&gt;&lt;P&gt;If PHASE1 = 'X', STATUS = 'CREATED' &lt;/P&gt;&lt;P&gt;If PHASE2 = 'X', STATUS = 'RELEASED'&lt;/P&gt;&lt;P&gt;If PHASE3 = 'X', STATUS = 'COMPLETED'&lt;/P&gt;&lt;P&gt;If PHASE4 = 'X', STATUS = 'CLOSED'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What would be the best way to do this in a Load statement?&amp;nbsp; I tried working with maps but couldn't figure it out since the status flags are in separate fields.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Oct 2014 20:46:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Create-status-field-in-load-based-on-four-separate-fields/m-p/694677#M1056413</guid>
      <dc:creator />
      <dc:date>2014-10-24T20:46:02Z</dc:date>
    </item>
    <item>
      <title>Re: Create status field in load based on four separate fields</title>
      <link>https://community.qlik.com/t5/QlikView/Create-status-field-in-load-based-on-four-separate-fields/m-p/694678#M1056414</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;LOAD somefields,&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; If(PHASE1 = 'X', 'CREATED',&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; If(PHASE2 = 'X', 'RELEASED',&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; If(PHASE3 = 'X', 'COMPLETED',&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&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; If(PHASE4 = 'X', 'CLOSED')))) as &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;STATUS &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;FROM YourSource;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Oct 2014 20:55:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Create-status-field-in-load-based-on-four-separate-fields/m-p/694678#M1056414</guid>
      <dc:creator>MarcoWedel</dc:creator>
      <dc:date>2014-10-24T20:55:03Z</dc:date>
    </item>
    <item>
      <title>Re: Create status field in load based on four separate fields</title>
      <link>https://community.qlik.com/t5/QlikView/Create-status-field-in-load-based-on-four-separate-fields/m-p/694679#M1056415</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Robert,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2 ways I can think of:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. Nested if statements :&lt;/P&gt;&lt;P&gt;ie:&lt;/P&gt;&lt;P&gt;if(Phase1='X', 'CREATED',&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; if(Phase2='X', 'RELEASED')) as STATUS&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. Multiple loads and concatenate&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MainTable:&lt;/P&gt;&lt;P&gt;LOAD &lt;/P&gt;&lt;P&gt;&amp;nbsp; field1&lt;/P&gt;&lt;P&gt;&amp;nbsp; ,field2&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;&amp;nbsp; ,'CREATED' as STATUS&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;FROM SOMETABLE&lt;/P&gt;&lt;P&gt;WHERE Phase1='X';&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Concatenate(MainTable)&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;LOAD &lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;&amp;nbsp; field1&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;&amp;nbsp; ,field2&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;&lt;SPAN style="font-size: 10pt;"&gt;&amp;nbsp; ,'&lt;SPAN style="font-size: 13.3333330154419px;"&gt;RELEASED&lt;/SPAN&gt;' as STATUS&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;FROM SOMETABLE&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;WHERE Phase2='X';&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;The nested if statement might be easiest.&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;Hope this helps.&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;Mark&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;www.techstuffy.com&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Oct 2014 20:57:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Create-status-field-in-load-based-on-four-separate-fields/m-p/694679#M1056415</guid>
      <dc:creator>markodonovan</dc:creator>
      <dc:date>2014-10-24T20:57:39Z</dc:date>
    </item>
    <item>
      <title>Re: Create status field in load based on four separate fields</title>
      <link>https://community.qlik.com/t5/QlikView/Create-status-field-in-load-based-on-four-separate-fields/m-p/694680#M1056416</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you both for the answers!&amp;nbsp; I should have looked into the 'If' statement more, I didn't realize I could nest them like that to act like an if/else chain.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Oct 2014 21:01:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Create-status-field-in-load-based-on-four-separate-fields/m-p/694680#M1056416</guid>
      <dc:creator />
      <dc:date>2014-10-24T21:01:22Z</dc:date>
    </item>
    <item>
      <title>Re: Create status field in load based on four separate fields</title>
      <link>https://community.qlik.com/t5/QlikView/Create-status-field-in-load-based-on-four-separate-fields/m-p/694681#M1056417</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;load&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; somefields,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; pick(match('X', PHASE1, PHASE2, PHASE3, PHASE4),&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 'CREATED','RELEASED','COMPLETED','CLOSED') as Status&lt;/P&gt;&lt;P&gt;from&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; somesource;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Oct 2014 21:04:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Create-status-field-in-load-based-on-four-separate-fields/m-p/694681#M1056417</guid>
      <dc:creator>maxgro</dc:creator>
      <dc:date>2014-10-24T21:04:11Z</dc:date>
    </item>
  </channel>
</rss>

