<?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 how to create Discount Range ListBox Object in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/how-to-create-Discount-Range-ListBox-Object/m-p/355011#M1174583</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Have you tried using an expression like&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if ((Expression)&amp;gt;=.00 and (Expression)&amp;lt;=.1,'0-10 %',&lt;/P&gt;&lt;P&gt;if ((Expression)&amp;gt;=.11 and (Expression)&amp;lt;=.2,'11-20 %',&lt;/P&gt;&lt;P&gt;if ((Expression)&amp;gt;=.21 and (Expression)&amp;lt;=.3,'21-30 %')))&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 17 Apr 2012 14:12:16 GMT</pubDate>
    <dc:creator />
    <dc:date>2012-04-17T14:12:16Z</dc:date>
    <item>
      <title>how to create Discount Range ListBox Object</title>
      <link>https://community.qlik.com/t5/QlikView/how-to-create-Discount-Range-ListBox-Object/m-p/355010#M1174582</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear All.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i have fields Product &lt;STRONG&gt;FullPrice&lt;/STRONG&gt; And&lt;STRONG&gt; Price,&lt;/STRONG&gt; From that i have calculated Discount. &lt;/P&gt;&lt;P&gt;i need the discount Range in ListBox &lt;/P&gt;&lt;P&gt;like&lt;/P&gt;&lt;P&gt;0-10 %&lt;/P&gt;&lt;P&gt;11-20 %&lt;/P&gt;&lt;P&gt;21-30 % and soon.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;when ever i select &lt;STRONG&gt;0-10 %&lt;/STRONG&gt;&amp;nbsp; it should show all the products details with inRange 0-10% discount.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and i don't want to do it in Edit Script.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i want to do it in Listbox Expression.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks,&lt;/P&gt;&lt;P&gt;Mukram.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Apr 2012 13:21:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/how-to-create-Discount-Range-ListBox-Object/m-p/355010#M1174582</guid>
      <dc:creator />
      <dc:date>2012-04-17T13:21:28Z</dc:date>
    </item>
    <item>
      <title>how to create Discount Range ListBox Object</title>
      <link>https://community.qlik.com/t5/QlikView/how-to-create-Discount-Range-ListBox-Object/m-p/355011#M1174583</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Have you tried using an expression like&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if ((Expression)&amp;gt;=.00 and (Expression)&amp;lt;=.1,'0-10 %',&lt;/P&gt;&lt;P&gt;if ((Expression)&amp;gt;=.11 and (Expression)&amp;lt;=.2,'11-20 %',&lt;/P&gt;&lt;P&gt;if ((Expression)&amp;gt;=.21 and (Expression)&amp;lt;=.3,'21-30 %')))&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Apr 2012 14:12:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/how-to-create-Discount-Range-ListBox-Object/m-p/355011#M1174583</guid>
      <dc:creator />
      <dc:date>2012-04-17T14:12:16Z</dc:date>
    </item>
    <item>
      <title>how to create Discount Range ListBox Object</title>
      <link>https://community.qlik.com/t5/QlikView/how-to-create-Discount-Range-ListBox-Object/m-p/355012#M1174584</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Mukram,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you dont want to change your script I would suggest that you make a variable which calculate your expression.&lt;/P&gt;&lt;P&gt;This variable then can be used in your expression.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Use CTRL + Alt + v to open your variabel overview.&lt;/P&gt;&lt;P&gt;Choos Add&lt;/P&gt;&lt;P&gt;Pick an name (fe VPercentage)&lt;/P&gt;&lt;P&gt;And add the calculation for your percentage as the definition.&lt;/P&gt;&lt;P&gt;in your case I think it will :&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; FullPrice / (Price - FullPrice) &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now you can use $(vPercentage) everywhere in your Qlikview to show the discount percentage.&lt;/P&gt;&lt;P&gt;Also in your listbox expersion.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;That should look like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=IF ($(vPercentage) &amp;lt; 10 , '0-10%'&lt;/P&gt;&lt;P&gt;, IF ($(vPercentage) &amp;gt;= 11 and $(vPercentage) &amp;lt;= 20 , '10-20%'&lt;/P&gt;&lt;P&gt;, IF ($(vPercentage) &amp;gt;= 21 and $(vPercentage) &amp;lt;= 30 , '20-30%'&lt;/P&gt;&lt;P&gt;, IF ($(vPercentage) &amp;gt;= 31 and $(vPercentage) &amp;lt;= 40 , '30-40%'&lt;/P&gt;&lt;P&gt;, IF ($(vPercentage) &amp;gt;= 41 and $(vPercentage) &amp;lt;= 50 , '40-50%'&lt;/P&gt;&lt;P&gt;, IF ($(vPercentage) &amp;gt;= 51 and $(vPercentage) &amp;lt;= 60 , '50-60%'&lt;/P&gt;&lt;P&gt;, IF ($(vPercentage) &amp;gt;= 61 and $(vPercentage) &amp;lt;= 70 , '60-70%'&lt;/P&gt;&lt;P&gt;, IF ($(vPercentage) &amp;gt;= 71 and $(vPercentage) &amp;lt;= 80 , '70-80%'&lt;/P&gt;&lt;P&gt;, IF ($(vPercentage) &amp;gt;= 81 and $(vPercentage) &amp;lt;= 90 , '80-90%'&lt;/P&gt;&lt;P&gt;, IF ($(vPercentage) &amp;gt;= 91&amp;nbsp; , '90 + %'&lt;/P&gt;&lt;P&gt;))))))))))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this is helpfull for you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Good Luck,&lt;/P&gt;&lt;P&gt;Dennis.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Apr 2012 14:36:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/how-to-create-Discount-Range-ListBox-Object/m-p/355012#M1174584</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-04-17T14:36:33Z</dc:date>
    </item>
    <item>
      <title>Re: how to create Discount Range ListBox Object</title>
      <link>https://community.qlik.com/t5/QlikView/how-to-create-Discount-Range-ListBox-Object/m-p/355013#M1174585</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I strongly recommend you to do it in the Script.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Remember if you put any logical expression in the front end it will execute everytime any one interact with the application. Look at your script and sometime a small design change can help you achieve great results. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Anyway if there is absolutely no way to do in the backend , you can try creating an expression in the list box as follows&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=pick(if(Price=0,10,if(Price=100,1,Ceil(1-(Price/FullPrice),0.1)*10)),'0-10','10-20','20-30','30-40','40-50','50-60','60-70','70-80','80-90','90-100')&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Test the logic multiple times before you use this expression. &lt;/P&gt;&lt;P&gt;May be you can think along these lines to get a different expression suitable for your scenario.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The attached file contains a small example of how you can try this approach.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Apr 2012 14:37:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/how-to-create-Discount-Range-ListBox-Object/m-p/355013#M1174585</guid>
      <dc:creator />
      <dc:date>2012-04-17T14:37:34Z</dc:date>
    </item>
  </channel>
</rss>

