<?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: How to use Decode in qliksense ? in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/How-to-use-Decode-in-qliksense/m-p/1816260#M66798</link>
    <description>&lt;P&gt;Hi, maybe there is a better way but this could be something like:&lt;/P&gt;&lt;P&gt;If(&lt;STRONG&gt;Match(&lt;/STRONG&gt;&lt;FONT color="#FF9900"&gt;Sign(it.x_value) &amp;amp; tt.description&lt;/FONT&gt;,&lt;FONT color="#3366FF"&gt;&lt;SPAN&gt;'0Switch', 'Switch In', '1Switch', 'Switch In', '-1Switch', 'Switch Out',&lt;/SPAN&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;SPAN&gt;&lt;FONT color="#3366FF"&gt;'0Transfer', 'Transfer In', '1Transfer', 'Transfer In', '-1Transfer', 'Transfer Out'&lt;/FONT&gt;&lt;STRONG&gt;)&lt;/STRONG&gt;,&amp;nbsp;tt.description, 'Other')&amp;nbsp;as transaction_type,&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Sat, 19 Jun 2021 07:54:19 GMT</pubDate>
    <dc:creator>rubenmarin</dc:creator>
    <dc:date>2021-06-19T07:54:19Z</dc:date>
    <item>
      <title>How to use Decode in qliksense ?</title>
      <link>https://community.qlik.com/t5/App-Development/How-to-use-Decode-in-qliksense/m-p/1815783#M66758</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I am trying to convert below decode from SQL query in qliksense, I tried to use pick &amp;amp; match but it failed as it skips values other than the conditional values of transaction type passed to decode.&lt;/P&gt;&lt;P&gt;decode(sign(it.x_value) || tt.description,&lt;BR /&gt;'0Switch', 'Switch In', '1Switch', 'Switch In', '-1Switch', 'Switch Out',&lt;BR /&gt;'0Transfer', 'Transfer In', '1Transfer', 'Transfer In', '-1Transfer', 'Transfer Out',&lt;BR /&gt;nvl( tt.description, 'Other' ) ) as transaction_type,&lt;/P&gt;&lt;P&gt;Note: where description is transaction_type as Switch,Transfer etc.&lt;/P&gt;</description>
      <pubDate>Thu, 17 Jun 2021 12:34:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/How-to-use-Decode-in-qliksense/m-p/1815783#M66758</guid>
      <dc:creator>rupalimane1390</dc:creator>
      <dc:date>2021-06-17T12:34:53Z</dc:date>
    </item>
    <item>
      <title>Re: How to use Decode in qliksense ?</title>
      <link>https://community.qlik.com/t5/App-Development/How-to-use-Decode-in-qliksense/m-p/1816260#M66798</link>
      <description>&lt;P&gt;Hi, maybe there is a better way but this could be something like:&lt;/P&gt;&lt;P&gt;If(&lt;STRONG&gt;Match(&lt;/STRONG&gt;&lt;FONT color="#FF9900"&gt;Sign(it.x_value) &amp;amp; tt.description&lt;/FONT&gt;,&lt;FONT color="#3366FF"&gt;&lt;SPAN&gt;'0Switch', 'Switch In', '1Switch', 'Switch In', '-1Switch', 'Switch Out',&lt;/SPAN&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;SPAN&gt;&lt;FONT color="#3366FF"&gt;'0Transfer', 'Transfer In', '1Transfer', 'Transfer In', '-1Transfer', 'Transfer Out'&lt;/FONT&gt;&lt;STRONG&gt;)&lt;/STRONG&gt;,&amp;nbsp;tt.description, 'Other')&amp;nbsp;as transaction_type,&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 19 Jun 2021 07:54:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/How-to-use-Decode-in-qliksense/m-p/1816260#M66798</guid>
      <dc:creator>rubenmarin</dc:creator>
      <dc:date>2021-06-19T07:54:19Z</dc:date>
    </item>
    <item>
      <title>Re: How to use Decode in qliksense ?</title>
      <link>https://community.qlik.com/t5/App-Development/How-to-use-Decode-in-qliksense/m-p/1816522#M66831</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/22593"&gt;@rubenmarin&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;Thank you for your reply. This is not working as we need to flag 'other' only when transaction description is blank.&lt;/P&gt;&lt;P&gt;I found a solution&amp;nbsp; as below &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;DIV&gt;f(isnull(DESCRIPTION),'other',&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // Flagging as 'other' when DESCRIPTIONis null&lt;BR /&gt;pick(match(sign(X_VALUE)&amp;amp;''&amp;amp;DESCRIPTION,&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // Pick '0switch' then match as 'Switch In' and so on&lt;BR /&gt;'0Switch','1Switch','-1Switch','0Transfer','1Transfer','-1Transfer')+1,DESCRIPTION,&amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;BR /&gt;'Switch In','Switch In','Switch Out','Transfer In''Transfer In','Transfer Out')) as TRANSACTION_TYPE&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //Display&amp;nbsp;DESCRIPTION as it is when values are different than values passed in Pick and Match.&lt;/DIV&gt;</description>
      <pubDate>Mon, 21 Jun 2021 11:16:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/How-to-use-Decode-in-qliksense/m-p/1816522#M66831</guid>
      <dc:creator>rupalimane1390</dc:creator>
      <dc:date>2021-06-21T11:16:32Z</dc:date>
    </item>
  </channel>
</rss>

