<?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: Nested IF issue in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Nested-IF-issue/m-p/18672#M775636</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;May be this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;IF(IsNull(OriginalTable),&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;IF(Left(Trim(TableName), 4) = 'dbo.',Mid(Trim(TableName), 5),&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;IF(Left(Trim(TableName), 14) = 'Dimension.dbo.',Mid(Trim(TableName),15)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;, TableName))) as NewTableName&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;IMG alt="Capture.PNG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/202164_Capture.PNG" style="height: auto;" /&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 11 May 2018 11:15:46 GMT</pubDate>
    <dc:creator>sunny_talwar</dc:creator>
    <dc:date>2018-05-11T11:15:46Z</dc:date>
    <item>
      <title>Nested IF issue</title>
      <link>https://community.qlik.com/t5/QlikView/Nested-IF-issue/m-p/18669#M775633</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have the attached Document, I am trying to do an Nested IF but it is not returning the correct results for the field NewTableName.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What I want my new field ( &lt;SPAN style="font-size: 13.3333px;"&gt;NewTableName.)&lt;/SPAN&gt; to do is the following:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If the field "OriginaTable" is NOT NULL Then Check the field TableName and see if it has one of the below at the start of the value&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;'dbo.'&lt;/P&gt;&lt;P&gt;'Dimension.dbo,'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If it has then remove this from and use the value after this point, IF it does not have these values then just use the value from the field TableName.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For some reason it is still keeping the values 'dbo.' and 'Dimension.dbo.' in my new field ( &lt;SPAN style="font-size: 13.3333px;"&gt;NewTableName )&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Nov 2020 16:16:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Nested-IF-issue/m-p/18669#M775633</guid>
      <dc:creator>ivandrago</dc:creator>
      <dc:date>2020-11-25T16:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: Nested IF issue</title>
      <link>https://community.qlik.com/t5/QlikView/Nested-IF-issue/m-p/18670#M775634</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;try this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF(len(trim(OriginalTable))=0,&lt;/P&gt;&lt;P&gt;IF(LEFT(TableName,4) = 'dbo.',&lt;SPAN style="font-size: 13.3333px;"&gt;TextBetween(TableName,'.','')&lt;/SPAN&gt; ,&lt;/P&gt;&lt;P&gt;IF(LEFT(TableName,14) = 'Dimension.dbo.',mid(OriginalTable,Index( OriginalTable,'.',2)+1)&lt;/P&gt;&lt;P&gt;)),TableName) as NewTableName&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 May 2018 10:17:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Nested-IF-issue/m-p/18670#M775634</guid>
      <dc:creator>YoussefBelloum</dc:creator>
      <dc:date>2018-05-11T10:17:03Z</dc:date>
    </item>
    <item>
      <title>Re: Nested IF issue</title>
      <link>https://community.qlik.com/t5/QlikView/Nested-IF-issue/m-p/18671#M775635</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;May be try&lt;/P&gt;&lt;P&gt;SubField(TableName,'.',-1) as NewTableName&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 May 2018 10:32:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Nested-IF-issue/m-p/18671#M775635</guid>
      <dc:creator>sasiparupudi1</dc:creator>
      <dc:date>2018-05-11T10:32:45Z</dc:date>
    </item>
    <item>
      <title>Re: Nested IF issue</title>
      <link>https://community.qlik.com/t5/QlikView/Nested-IF-issue/m-p/18672#M775636</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;May be this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;IF(IsNull(OriginalTable),&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;IF(Left(Trim(TableName), 4) = 'dbo.',Mid(Trim(TableName), 5),&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;IF(Left(Trim(TableName), 14) = 'Dimension.dbo.',Mid(Trim(TableName),15)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;, TableName))) as NewTableName&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;IMG alt="Capture.PNG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/202164_Capture.PNG" style="height: auto;" /&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 May 2018 11:15:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Nested-IF-issue/m-p/18672#M775636</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2018-05-11T11:15:46Z</dc:date>
    </item>
    <item>
      <title>Re: Nested IF issue</title>
      <link>https://community.qlik.com/t5/QlikView/Nested-IF-issue/m-p/18673#M775637</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Youssef,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have tried your formula but it does not seem to work, if you look at the attached I am not expecting to see values in the new field if the field OriginalTable has a value in it and where it hasn't I still want to show the value from the field TableName even if it doesn't meet the 'dbo.' and 'Dimension.dbo' requirements.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 May 2018 11:52:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Nested-IF-issue/m-p/18673#M775637</guid>
      <dc:creator>ivandrago</dc:creator>
      <dc:date>2018-05-11T11:52:48Z</dc:date>
    </item>
    <item>
      <title>Re: Nested IF issue</title>
      <link>https://community.qlik.com/t5/QlikView/Nested-IF-issue/m-p/18674#M775638</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;My bad, I didn't pay enough attention to it, and I made the opposite..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;try this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;IF(len(trim(OriginalTable))&lt;STRONG&gt;&amp;lt;&amp;gt;&lt;/STRONG&gt;0,&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;IF(LEFT(TableName,4) = 'dbo.',&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 13.3333px; font-family: inherit;"&gt;TextBetween(TableName,'.','')&lt;/SPAN&gt; ,&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;IF(LEFT(TableName,14) = 'Dimension.dbo.',mid(OriginalTable,Index( OriginalTable,'.',2)+1)&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;)),TableName) as NewTableName&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 May 2018 12:12:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Nested-IF-issue/m-p/18674#M775638</guid>
      <dc:creator>YoussefBelloum</dc:creator>
      <dc:date>2018-05-11T12:12:44Z</dc:date>
    </item>
    <item>
      <title>Re: Nested IF issue</title>
      <link>https://community.qlik.com/t5/QlikView/Nested-IF-issue/m-p/18675#M775639</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Still seeing values in the new field if there is a value in the OriginalTable, I'm expecting the new field not have a value there.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 May 2018 12:24:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Nested-IF-issue/m-p/18675#M775639</guid>
      <dc:creator>ivandrago</dc:creator>
      <dc:date>2018-05-11T12:24:33Z</dc:date>
    </item>
    <item>
      <title>Re: Nested IF issue</title>
      <link>https://community.qlik.com/t5/QlikView/Nested-IF-issue/m-p/18676#M775640</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Did you get a chance to try this?&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;IF(IsNull(OriginalTable),&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;IF(Left(Trim(TableName), 4) = 'dbo.',Mid(Trim(TableName), 5),&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;IF(Left(Trim(TableName), 14) = 'Dimension.dbo.',Mid(Trim(TableName),15)&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;, TableName))) as NewTableName&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 May 2018 12:26:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Nested-IF-issue/m-p/18676#M775640</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2018-05-11T12:26:18Z</dc:date>
    </item>
    <item>
      <title>Re: Nested IF issue</title>
      <link>https://community.qlik.com/t5/QlikView/Nested-IF-issue/m-p/18677#M775641</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;May be it is following&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;IF&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;IsNull&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;OriginalTable&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;),&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;IF&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Left&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Trim&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;TableName&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;), 4) = 'dbo.',&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Mid&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Trim&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;TableName&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;), 5),&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;IF&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Left&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Trim&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;TableName&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;), 14) = 'Dimension.dbo.',&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Mid&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Trim&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;TableName&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;),15)&lt;BR /&gt; , &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;TableName&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;)), &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;TableName&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;) &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;as&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;NewTableName&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;BR /&gt; ; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;IMG alt="table.PNG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/202162_table.PNG" style="height: auto;" /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 May 2018 12:31:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Nested-IF-issue/m-p/18677#M775641</guid>
      <dc:creator>vvira1316</dc:creator>
      <dc:date>2018-05-11T12:31:19Z</dc:date>
    </item>
  </channel>
</rss>

