<?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 If else condition if we have data in combination of number,text in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/If-else-condition-if-we-have-data-in-combination-of-number-text/m-p/1741264#M56757</link>
    <description>&lt;P&gt;hi&lt;/P&gt;&lt;P&gt;I have a Period column with combination of integer and text.&lt;/P&gt;&lt;P&gt;I have a requirement to create a new filed,first it will check if it contains integer return same if not return "Others"&lt;/P&gt;&lt;P&gt;I have tried below logic,but didn't worked.&lt;/P&gt;&lt;P&gt;if(IsNum(Period)&amp;gt;0,Period,'Others') as Newfield&lt;/P&gt;&lt;P&gt;Period&lt;/P&gt;&lt;TABLE width="110"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="110"&gt;03M&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;06M&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;01M&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;03M&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;06M&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;01D&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;F&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;RBWM&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;F&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;CMB&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;</description>
    <pubDate>Sat, 16 Nov 2024 18:08:57 GMT</pubDate>
    <dc:creator>grajmca_sgp123</dc:creator>
    <dc:date>2024-11-16T18:08:57Z</dc:date>
    <item>
      <title>If else condition if we have data in combination of number,text</title>
      <link>https://community.qlik.com/t5/App-Development/If-else-condition-if-we-have-data-in-combination-of-number-text/m-p/1741264#M56757</link>
      <description>&lt;P&gt;hi&lt;/P&gt;&lt;P&gt;I have a Period column with combination of integer and text.&lt;/P&gt;&lt;P&gt;I have a requirement to create a new filed,first it will check if it contains integer return same if not return "Others"&lt;/P&gt;&lt;P&gt;I have tried below logic,but didn't worked.&lt;/P&gt;&lt;P&gt;if(IsNum(Period)&amp;gt;0,Period,'Others') as Newfield&lt;/P&gt;&lt;P&gt;Period&lt;/P&gt;&lt;TABLE width="110"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="110"&gt;03M&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;06M&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;01M&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;03M&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;06M&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;01D&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;F&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;RBWM&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;F&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;CMB&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;</description>
      <pubDate>Sat, 16 Nov 2024 18:08:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/If-else-condition-if-we-have-data-in-combination-of-number-text/m-p/1741264#M56757</guid>
      <dc:creator>grajmca_sgp123</dc:creator>
      <dc:date>2024-11-16T18:08:57Z</dc:date>
    </item>
    <item>
      <title>Re: If else condition if we have data in combination of number,text</title>
      <link>https://community.qlik.com/t5/App-Development/If-else-condition-if-we-have-data-in-combination-of-number-text/m-p/1741266#M56758</link>
      <description>&lt;P&gt;Try:&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;if(IsNum(Period),Period,'Others') as Newfield&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;STRONG&gt; // no '&amp;gt; 0'&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 04 Sep 2020 11:54:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/If-else-condition-if-we-have-data-in-combination-of-number-text/m-p/1741266#M56758</guid>
      <dc:creator>tresB</dc:creator>
      <dc:date>2020-09-04T11:54:35Z</dc:date>
    </item>
    <item>
      <title>Re: If else condition if we have data in combination of number,text</title>
      <link>https://community.qlik.com/t5/App-Development/If-else-condition-if-we-have-data-in-combination-of-number-text/m-p/1741267#M56759</link>
      <description>&lt;P&gt;tried but no luck,all are returning else part as "Others"&lt;/P&gt;</description>
      <pubDate>Fri, 04 Sep 2020 11:59:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/If-else-condition-if-we-have-data-in-combination-of-number-text/m-p/1741267#M56759</guid>
      <dc:creator>grajmca_sgp123</dc:creator>
      <dc:date>2020-09-04T11:59:22Z</dc:date>
    </item>
    <item>
      <title>Re: If else condition if we have data in combination of number,text</title>
      <link>https://community.qlik.com/t5/App-Development/If-else-condition-if-we-have-data-in-combination-of-number-text/m-p/1741285#M56761</link>
      <description>&lt;P&gt;May be best to always treat it as a string and go for string functions only:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;if(len(purgechar(Period, '0123456789')) = 0, Period, 'Others') as NewField,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;You may also find that the&amp;nbsp;&lt;STRONG&gt;num#&lt;/STRONG&gt; function works&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;if(IsNull(num#(Period)), 'Others', Period) as NewField,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 04 Sep 2020 13:01:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/If-else-condition-if-we-have-data-in-combination-of-number-text/m-p/1741285#M56761</guid>
      <dc:creator>stevedark</dc:creator>
      <dc:date>2020-09-04T13:01:45Z</dc:date>
    </item>
    <item>
      <title>Re: If else condition if we have data in combination of number,text</title>
      <link>https://community.qlik.com/t5/App-Development/If-else-condition-if-we-have-data-in-combination-of-number-text/m-p/1741309#M56766</link>
      <description>&lt;P&gt;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/50012"&gt;@grajmca_sgp123&lt;/a&gt;&amp;nbsp; try below&lt;/P&gt;&lt;P&gt;if(KeepChar(Data,'0123456789'),Data,'Others') as NewField&lt;/P&gt;</description>
      <pubDate>Fri, 04 Sep 2020 14:35:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/If-else-condition-if-we-have-data-in-combination-of-number-text/m-p/1741309#M56766</guid>
      <dc:creator>Kushal_Chawda</dc:creator>
      <dc:date>2020-09-04T14:35:19Z</dc:date>
    </item>
    <item>
      <title>Re: If else condition if we have data in combination of number,text</title>
      <link>https://community.qlik.com/t5/App-Development/If-else-condition-if-we-have-data-in-combination-of-number-text/m-p/1741310#M56767</link>
      <description>&lt;P&gt;Thank you Steve,I just updated your logic and worked well.&lt;/P&gt;&lt;P&gt;=if(Len(KeepChar(sunf,'0123456789'))&amp;gt;0,sunf,'Others')&lt;/P&gt;</description>
      <pubDate>Fri, 04 Sep 2020 14:36:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/If-else-condition-if-we-have-data-in-combination-of-number-text/m-p/1741310#M56767</guid>
      <dc:creator>grajmca_sgp123</dc:creator>
      <dc:date>2020-09-04T14:36:12Z</dc:date>
    </item>
    <item>
      <title>Re: If else condition if we have data in combination of number,text</title>
      <link>https://community.qlik.com/t5/App-Development/If-else-condition-if-we-have-data-in-combination-of-number-text/m-p/1741313#M56768</link>
      <description>&lt;P&gt;Sorry, I assumed that as you were using IsNum in your original query you only wanted if the field only contained numeric. This is why IsNum will not have worked if the field was a mixed string.&lt;/P&gt;&lt;P&gt;Thanks for the update.&lt;/P&gt;</description>
      <pubDate>Fri, 04 Sep 2020 14:45:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/If-else-condition-if-we-have-data-in-combination-of-number-text/m-p/1741313#M56768</guid>
      <dc:creator>stevedark</dc:creator>
      <dc:date>2020-09-04T14:45:36Z</dc:date>
    </item>
  </channel>
</rss>

