<?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 Need joining logic in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Need-joining-logic/m-p/1599849#M737868</link>
    <description>&lt;P&gt;Hi ,&lt;/P&gt;&lt;P&gt;I have a excel file, it has 5 colums&lt;/P&gt;&lt;P&gt;BusinessLevel1, BusinessLevel2, BusinessLevel3,BusinessLevel4,BusinessLevel5 . 5 being the most granularity of data.&lt;/P&gt;&lt;P&gt;BusinessLevel1, BusinessLevel2, BusinessLevel3,BusinessLevel4,BusinessLevel5&lt;/P&gt;&lt;P&gt;xxx,yyy,zzz,ppp,qqq&lt;/P&gt;&lt;P&gt;abc,bbb,ccc, , ,&lt;/P&gt;&lt;P&gt;ddd,eee, , ,rrr&lt;/P&gt;&lt;P&gt;I need to create a derive column name Business based on the logic , first look for data in BusinessLevel5, if found take it , if there is no data in level5 look for businesslevel4 , if data found take it if not look for leve3 and so forth in the script level.&lt;/P&gt;&lt;P&gt;Please help me to jot down the logic.&lt;/P&gt;</description>
    <pubDate>Sat, 16 Nov 2024 03:04:24 GMT</pubDate>
    <dc:creator>ashis</dc:creator>
    <dc:date>2024-11-16T03:04:24Z</dc:date>
    <item>
      <title>Need joining logic</title>
      <link>https://community.qlik.com/t5/QlikView/Need-joining-logic/m-p/1599849#M737868</link>
      <description>&lt;P&gt;Hi ,&lt;/P&gt;&lt;P&gt;I have a excel file, it has 5 colums&lt;/P&gt;&lt;P&gt;BusinessLevel1, BusinessLevel2, BusinessLevel3,BusinessLevel4,BusinessLevel5 . 5 being the most granularity of data.&lt;/P&gt;&lt;P&gt;BusinessLevel1, BusinessLevel2, BusinessLevel3,BusinessLevel4,BusinessLevel5&lt;/P&gt;&lt;P&gt;xxx,yyy,zzz,ppp,qqq&lt;/P&gt;&lt;P&gt;abc,bbb,ccc, , ,&lt;/P&gt;&lt;P&gt;ddd,eee, , ,rrr&lt;/P&gt;&lt;P&gt;I need to create a derive column name Business based on the logic , first look for data in BusinessLevel5, if found take it , if there is no data in level5 look for businesslevel4 , if data found take it if not look for leve3 and so forth in the script level.&lt;/P&gt;&lt;P&gt;Please help me to jot down the logic.&lt;/P&gt;</description>
      <pubDate>Sat, 16 Nov 2024 03:04:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Need-joining-logic/m-p/1599849#M737868</guid>
      <dc:creator>ashis</dc:creator>
      <dc:date>2024-11-16T03:04:24Z</dc:date>
    </item>
    <item>
      <title>Re: Need joining logic</title>
      <link>https://community.qlik.com/t5/QlikView/Need-joining-logic/m-p/1599893#M737869</link>
      <description>&lt;P&gt;One way you can do this is as below:&lt;/P&gt;&lt;P&gt;Data:&lt;BR /&gt;Load *,&lt;BR /&gt;If(Len(BusinessLevel5)&amp;gt;0,BusinessLevel5,&lt;BR /&gt;If(Len(BusinessLevel4)&amp;gt;0,BusinessLevel4,&lt;BR /&gt;If(Len(BusinessLevel3)&amp;gt;0,BusinessLevel3,&lt;BR /&gt;If(Len(BusinessLevel2)&amp;gt;0,BusinessLevel2,&lt;BR /&gt;If(Len(BusinessLevel1)&amp;gt;0,BusinessLevel1))))) as Business;&lt;BR /&gt;Load * Inline [&lt;BR /&gt;BusinessLevel1, BusinessLevel2, BusinessLevel3, BusinessLevel4, BusinessLevel5&lt;BR /&gt;xxx,yyy,zzz,ppp,qqq&lt;BR /&gt;abc,bbb,ccc,,,&lt;BR /&gt;ddd,eee,,,rrr&lt;BR /&gt;];&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Logic.PNG" style="width: 542px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/15057iE5F88C4CD1B6CB29/image-size/large?v=v2&amp;amp;px=999" role="button" title="Logic.PNG" alt="Logic.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 08 Jul 2019 12:37:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Need-joining-logic/m-p/1599893#M737869</guid>
      <dc:creator>trdandamudi</dc:creator>
      <dc:date>2019-07-08T12:37:17Z</dc:date>
    </item>
    <item>
      <title>Re: Need joining logic</title>
      <link>https://community.qlik.com/t5/QlikView/Need-joining-logic/m-p/1599902#M737870</link>
      <description>&lt;P&gt;You could solve this with a series of nested IF statements like&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/22248"&gt;@trdandamudi&lt;/a&gt;&amp;nbsp;example above.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You could also solve it by performing a crosstable load and picking the value of the highest BusinessLevelX like below. I added an dimension (ID) to the row in order to get the crosstable to work.&lt;/P&gt;&lt;LI-CODE lang="php"&gt;set NullInterpret =''; //needed in order to inteperet empty values in inline as null

Businesslevel:
CrossTable (Businesslevel, BusinessName)
LOAD 
  * 
inline [
  ID, BusinessLevel1, BusinessLevel2, BusinessLevel3,BusinessLevel4,BusinessLevel5
  A, xxx,yyy,zzz,ppp,qqq
  B, abc,bbb,ccc, , ,
  C, ddd,eee, , ,rrr
  ];

RIGHT JOIN (Businesslevel) 
LOAD
  MaxString(Businesslevel) as Businesslevel,
  ID
Resident 
  Businesslevel
group by ID
;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 08 Jul 2019 13:03:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Need-joining-logic/m-p/1599902#M737870</guid>
      <dc:creator>Vegar</dc:creator>
      <dc:date>2019-07-08T13:03:04Z</dc:date>
    </item>
    <item>
      <title>Re: Need joining logic</title>
      <link>https://community.qlik.com/t5/QlikView/Need-joining-logic/m-p/1600174#M737871</link>
      <description>&lt;P&gt;Hi trdandamudi, Your solution works . Thank you so much for your reply.&lt;/P&gt;</description>
      <pubDate>Tue, 09 Jul 2019 03:51:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Need-joining-logic/m-p/1600174#M737871</guid>
      <dc:creator>ashis</dc:creator>
      <dc:date>2019-07-09T03:51:55Z</dc:date>
    </item>
    <item>
      <title>Re: Need joining logic</title>
      <link>https://community.qlik.com/t5/QlikView/Need-joining-logic/m-p/1600175#M737872</link>
      <description>&lt;P&gt;Hi Vegar, Thank you so much for your reply.&lt;/P&gt;&lt;P&gt;It suggestion works as well. At this moment we do not have ID column that you have introduced. Do i need to create on the fly in order to work the cross table ?&lt;/P&gt;</description>
      <pubDate>Tue, 09 Jul 2019 03:54:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Need-joining-logic/m-p/1600175#M737872</guid>
      <dc:creator>ashis</dc:creator>
      <dc:date>2019-07-09T03:54:14Z</dc:date>
    </item>
    <item>
      <title>Re: Need joining logic</title>
      <link>https://community.qlik.com/t5/QlikView/Need-joining-logic/m-p/1600188#M737873</link>
      <description>You don't need an ID, but you do need at least one dimension that is not to&lt;BR /&gt;be transposed.&lt;BR /&gt;&lt;BR /&gt;If you no not have a dimension you can create one like I did and drop it&lt;BR /&gt;after your Crosstable is executed.&lt;BR /&gt;&lt;BR /&gt;-Vegar&lt;BR /&gt;</description>
      <pubDate>Tue, 09 Jul 2019 04:55:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Need-joining-logic/m-p/1600188#M737873</guid>
      <dc:creator>Vegar</dc:creator>
      <dc:date>2019-07-09T04:55:03Z</dc:date>
    </item>
  </channel>
</rss>

