<?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: ADD one more Option in Expression in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/ADD-one-more-Option-in-Expression/m-p/1597112#M444011</link>
    <description>&lt;P&gt;Lots of thanks.&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":smiling_face_with_smiling_eyes:"&gt;😊&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Fri, 28 Jun 2019 07:37:00 GMT</pubDate>
    <dc:creator>sona_sa</dc:creator>
    <dc:date>2019-06-28T07:37:00Z</dc:date>
    <item>
      <title>ADD one more Option in Expression</title>
      <link>https://community.qlik.com/t5/QlikView/ADD-one-more-Option-in-Expression/m-p/1596255#M443921</link>
      <description>&lt;DIV class="topic-subject-wrapper"&gt;&lt;DIV class="lia-message-subject lia-component-message-view-widget-subject"&gt;&lt;DIV class="MessageSubject"&gt;&lt;SPAN&gt;Hi Team,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV class="lia-message-body lia-component-message-view-widget-body lia-component-body-signature-highlight-escalation lia-component-message-view-widget-body-signature-highlight-escalation"&gt;&lt;DIV class="lia-message-body-content"&gt;&lt;P&gt;I have scenario, Like this.&lt;/P&gt;&lt;P&gt;I have 3 List box.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Option 1&lt;/STRONG&gt; - Million and Full, When User is selecting Million, Value is coming like 1.1 M, 1.45 M and When User is Selecting Full, Value is coming 1000000.45, 1010000 ...... in Straight Table&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Option 2&lt;/STRONG&gt; - No and Yes, When User is selecting No, Some Value is adding and When user is Selecting Yes, Value is extracting in Straight Table&lt;/P&gt;&lt;P&gt;Both is working well.&lt;/P&gt;&lt;P&gt;Now I have to add one more option, i.e - &lt;STRONG&gt;Option 3&lt;/STRONG&gt; - 1M, 2M and 3M, Suppose User select the 1M, Now I want only greater than 1M value record in my straight table.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Similarly for 2 Million and 3 Million. But my option 1 and option 2 should also work with Option 3.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Below is my Expression :&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;IF(GetFieldSelections(Option1)='Millions', IF(GetFieldSelections(Option2)='No',&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;sum({&amp;lt;sub_account={'EXPENSE'}&amp;gt;}Amount)/1000000,&amp;nbsp;&lt;/STRONG&gt;&lt;STRONG&gt;(Sum({&amp;lt;sub_account={'EXPENSE'}&amp;gt;}Amount_Ex_CC - Amount_Ex))/1000000),&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;IF(GetFieldSelections(Option2)='No', sum({&amp;lt;sub_account={'EXPENSE'}&amp;gt;}Amount),(Sum({&amp;lt;sub_account={'EXPENSE'}&amp;gt;}Amount_Ex_CC - Amount_Ex))))&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;This is single expression.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Can anyone add new option 3 in my above expression.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;AK&lt;/P&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Sat, 16 Nov 2024 03:10:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/ADD-one-more-Option-in-Expression/m-p/1596255#M443921</guid>
      <dc:creator>sona_sa</dc:creator>
      <dc:date>2024-11-16T03:10:41Z</dc:date>
    </item>
    <item>
      <title>Re: ADD one more Option in Expression</title>
      <link>https://community.qlik.com/t5/QlikView/ADD-one-more-Option-in-Expression/m-p/1596447#M443965</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I would take a different approach to simplify your expressions.&lt;/P&gt;&lt;P&gt;From the toy script at the bottom you get a disconnected table that lets you use Only(Divisor) to divide as your Option1 replacement. You would just put that at the end. Strength here is when someone says can you also do thousands … you just add to the table.&lt;/P&gt;&lt;P&gt;To impose the limit you could again have a Limit table disconnected (or maybe even just a variable) &amp;amp; use dimension limits.&lt;/P&gt;&lt;P&gt;You still use your IF statement for the other option, but would hopefully be easier to follow.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="20160626_1.png" style="width: 722px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/14501i6D2B172F88D34035/image-size/large?v=v2&amp;amp;px=999" role="button" title="20160626_1.png" alt="20160626_1.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;Chris.&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;divisor:
LOAD * INLINE [
    Option1, Divisor
    Millions, 1000000
    Units, 1
];

limit:
LOAD * INLINE [
    Limit
    1000000
    2000000
    3000000
];

data:
LOAD * INLINE [
    Dim, Mea
    A, 1000001
    B, 2000001
    C, 3000001
];&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 26 Jun 2019 19:02:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/ADD-one-more-Option-in-Expression/m-p/1596447#M443965</guid>
      <dc:creator>chrismarlow</dc:creator>
      <dc:date>2019-06-26T19:02:11Z</dc:date>
    </item>
    <item>
      <title>Re: ADD one more Option in Expression</title>
      <link>https://community.qlik.com/t5/QlikView/ADD-one-more-Option-in-Expression/m-p/1596578#M443980</link>
      <description>&lt;P&gt;Hi Chrismarlow,&lt;/P&gt;&lt;P&gt;Is it not possible to make any expression which I have written for Option1 and Option2. So If I am using Option 3, How I can put that condition in my expression.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;IF(GetFieldSelections(Option1)='Millions', IF(GetFieldSelections(Option2)='No',&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;sum({&amp;lt;sub_account={'EXPENSE'}&amp;gt;}Amount)/1000000,&amp;nbsp;&lt;/STRONG&gt;&lt;STRONG&gt;(Sum({&amp;lt;sub_account={'EXPENSE'}&amp;gt;}Amount_Ex_CC - Amount_Ex))/1000000),&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;IF(GetFieldSelections(Option2)='No', sum({&amp;lt;sub_account={'EXPENSE'}&amp;gt;}Amount),(Sum({&amp;lt;sub_account={'EXPENSE'}&amp;gt;}Amount_Ex_CC - Amount_Ex))))&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Regards,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;AK&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 27 Jun 2019 06:57:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/ADD-one-more-Option-in-Expression/m-p/1596578#M443980</guid>
      <dc:creator>sona_sa</dc:creator>
      <dc:date>2019-06-27T06:57:03Z</dc:date>
    </item>
    <item>
      <title>Re: ADD one more Option in Expression</title>
      <link>https://community.qlik.com/t5/QlikView/ADD-one-more-Option-in-Expression/m-p/1596704#M443984</link>
      <description>&lt;P&gt;Hi Chrismalow&lt;/P&gt;&lt;P&gt;Is it possible by expression, Below is required information:&lt;/P&gt;&lt;P&gt;I have a listbox : 1M, 2M and 3M, Created by Inline function, Below is script :&lt;/P&gt;&lt;P&gt;Option:&lt;BR /&gt;Load Inline [&lt;BR /&gt;Option, Num&lt;BR /&gt;'1 M $', 1000000&lt;BR /&gt;'2 M $', 2000000&lt;BR /&gt;'3 M $', 3000000&lt;BR /&gt;];&lt;/P&gt;&lt;P&gt;I have a straight table, Where All the possible value is displaying.&lt;/P&gt;&lt;P&gt;Now I want when I select 1M$, only greater than 1M value should to display in Straight Table.&lt;/P&gt;&lt;P&gt;When I select 2M$,&amp;nbsp;only greater than 2M value should to display in Straight Table, Similarly to 3M.&lt;/P&gt;&lt;P&gt;How I can do the same: Below is my Expression.&lt;/P&gt;&lt;P&gt;If (GetFieldSelections(Option1)='Millions', if(GetFieldSelections(Option2)='No', Sum({&amp;lt;account={'EXPENSE'}&amp;gt;}Amount)/1000000, Sum({&amp;lt;sub_account={'EXPENSE_TYPE'}&amp;gt;}Amount_CC)/1000000),&lt;BR /&gt;if(GetFieldSelections(Option2)='No', Sum({&amp;lt;sub_account={'EXPENSE'}&amp;gt;}Amount), Sum({&amp;lt;sub_account={'EXPENSE'}&amp;gt;}Amount_CC))))&lt;/P&gt;&lt;P&gt;Can you feed the logic for the same.&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;AK&lt;/P&gt;</description>
      <pubDate>Thu, 27 Jun 2019 10:51:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/ADD-one-more-Option-in-Expression/m-p/1596704#M443984</guid>
      <dc:creator>sona_sa</dc:creator>
      <dc:date>2019-06-27T10:51:56Z</dc:date>
    </item>
    <item>
      <title>Re: ADD one more Option in Expression</title>
      <link>https://community.qlik.com/t5/QlikView/ADD-one-more-Option-in-Expression/m-p/1596937#M444000</link>
      <description>&lt;P&gt;Is there any solution for the same.&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;AK&lt;/P&gt;</description>
      <pubDate>Thu, 27 Jun 2019 18:10:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/ADD-one-more-Option-in-Expression/m-p/1596937#M444000</guid>
      <dc:creator>sona_sa</dc:creator>
      <dc:date>2019-06-27T18:10:56Z</dc:date>
    </item>
    <item>
      <title>Re: ADD one more Option in Expression</title>
      <link>https://community.qlik.com/t5/QlikView/ADD-one-more-Option-in-Expression/m-p/1596952#M444002</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;So if you don't want to use the dimension limits but are happy to use the limit table per your post then your pattern involving the least repetition will be;&lt;/P&gt;&lt;P&gt;if(sum(Mea)&amp;gt;only(Limit),Sum(Mea),Null())/only(Divisor)&lt;/P&gt;&lt;P&gt;Slotting in your functions I &lt;EM&gt;think&lt;/EM&gt; would give;&lt;/P&gt;&lt;P&gt;if(if(GetFieldSelections(Option2)='No', Sum({&amp;lt;account={'EXPENSE'}&amp;gt;}Amount), Sum({&amp;lt;sub_account={'EXPENSE_TYPE'}&amp;gt;}Amount_CC))&amp;gt;only(Num),if(GetFieldSelections(Option2)='No', Sum({&amp;lt;account={'EXPENSE'}&amp;gt;}Amount), Sum({&amp;lt;sub_account={'EXPENSE_TYPE'}&amp;gt;}Amount_CC)),Null())/if (GetFieldSelections(Option1)='Millions',1000000,1)&lt;/P&gt;&lt;P&gt;Which will only work when you have something selected on Option table.&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;Chris.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="20160627_2.png" style="width: 931px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/14585iF10727B13D9FA342/image-size/large?v=v2&amp;amp;px=999" role="button" title="20160627_2.png" alt="20160627_2.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 27 Jun 2019 18:38:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/ADD-one-more-Option-in-Expression/m-p/1596952#M444002</guid>
      <dc:creator>chrismarlow</dc:creator>
      <dc:date>2019-06-27T18:38:38Z</dc:date>
    </item>
    <item>
      <title>Re: ADD one more Option in Expression</title>
      <link>https://community.qlik.com/t5/QlikView/ADD-one-more-Option-in-Expression/m-p/1597112#M444011</link>
      <description>&lt;P&gt;Lots of thanks.&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":smiling_face_with_smiling_eyes:"&gt;😊&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 28 Jun 2019 07:37:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/ADD-one-more-Option-in-Expression/m-p/1597112#M444011</guid>
      <dc:creator>sona_sa</dc:creator>
      <dc:date>2019-06-28T07:37:00Z</dc:date>
    </item>
    <item>
      <title>Re: ADD one more Option in Expression</title>
      <link>https://community.qlik.com/t5/QlikView/ADD-one-more-Option-in-Expression/m-p/1597224#M444016</link>
      <description>&lt;P&gt;You are welcome.&lt;/P&gt;</description>
      <pubDate>Fri, 28 Jun 2019 12:49:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/ADD-one-more-Option-in-Expression/m-p/1597224#M444016</guid>
      <dc:creator>chrismarlow</dc:creator>
      <dc:date>2019-06-28T12:49:21Z</dc:date>
    </item>
  </channel>
</rss>

