<?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 Calculate Index% from an expression using ValueList? in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Calculate-Index-from-an-expression-using-ValueList/m-p/234472#M85890</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;Anyone of you can help me with this please. I have a below expression in a chart which works fine and the Dimensions and Expression show fine without any issues, However&lt;/P&gt;&lt;P&gt;if(ValueList('Pre','Promo','Post','Result')='Pre', num(sum({&amp;lt;TIME_PERIOD_WEEK_NO=p(_WeekPre)&amp;gt;}/ count(_WeekPre)WK_SALES_GROSS_REV),'#,##0'),&lt;BR /&gt;if(ValueList('Pre','Promo','Post','Result')='Promo', num(sum({&amp;lt;TIME_PERIOD_WEEK_NO=p(_WeekPromo)&amp;gt;}/count(_WeekPromo) WK_SALES_GROSS_REV),'#,##0'),&lt;BR /&gt;if(ValueList('Pre','Promo','Post','Result')='Post', num(sum({&amp;lt;TIME_PERIOD_WEEK_NO=p(_WeekPost)&amp;gt;}/count(_WeekPro) WK_SALES_GROSS_REV),'#,##0'),&lt;BR /&gt;num(sum({&amp;lt;TIME_PERIOD_WEEK_NO=p(_WeekPost)&amp;gt;}/Count(_WeekPost) WK_SALES_GROSS_REV) / sum({&amp;lt;TIME_PERIOD_WEEK_NO=p(_WeekPre)&amp;gt;} /Count(_WeekPre) WK_SALES_GROSS_REV) - 1,'#,##0%'))))&lt;/P&gt;&lt;P&gt;in the chart, Now if I want to add another Dimension and column called 'Variance Index %'which is calculated as Post - Pre/ 100 to show in percentage. I was wondering how we can do it, I tried copying the whole expressions for Post and pre and then doing it, also I tried pasting them in variables and using these in the chart, but it doesnt seem to work. Any solution like we use, say if(ValueList(Pre,Post,Promo, Result, Index) = 'Index' 'Pre - Post/100. Please help me with this.&lt;/P&gt;&lt;P&gt;Thanks in Advance&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 01 Mar 2011 15:11:41 GMT</pubDate>
    <dc:creator />
    <dc:date>2011-03-01T15:11:41Z</dc:date>
    <item>
      <title>Calculate Index% from an expression using ValueList?</title>
      <link>https://community.qlik.com/t5/QlikView/Calculate-Index-from-an-expression-using-ValueList/m-p/234472#M85890</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;Anyone of you can help me with this please. I have a below expression in a chart which works fine and the Dimensions and Expression show fine without any issues, However&lt;/P&gt;&lt;P&gt;if(ValueList('Pre','Promo','Post','Result')='Pre', num(sum({&amp;lt;TIME_PERIOD_WEEK_NO=p(_WeekPre)&amp;gt;}/ count(_WeekPre)WK_SALES_GROSS_REV),'#,##0'),&lt;BR /&gt;if(ValueList('Pre','Promo','Post','Result')='Promo', num(sum({&amp;lt;TIME_PERIOD_WEEK_NO=p(_WeekPromo)&amp;gt;}/count(_WeekPromo) WK_SALES_GROSS_REV),'#,##0'),&lt;BR /&gt;if(ValueList('Pre','Promo','Post','Result')='Post', num(sum({&amp;lt;TIME_PERIOD_WEEK_NO=p(_WeekPost)&amp;gt;}/count(_WeekPro) WK_SALES_GROSS_REV),'#,##0'),&lt;BR /&gt;num(sum({&amp;lt;TIME_PERIOD_WEEK_NO=p(_WeekPost)&amp;gt;}/Count(_WeekPost) WK_SALES_GROSS_REV) / sum({&amp;lt;TIME_PERIOD_WEEK_NO=p(_WeekPre)&amp;gt;} /Count(_WeekPre) WK_SALES_GROSS_REV) - 1,'#,##0%'))))&lt;/P&gt;&lt;P&gt;in the chart, Now if I want to add another Dimension and column called 'Variance Index %'which is calculated as Post - Pre/ 100 to show in percentage. I was wondering how we can do it, I tried copying the whole expressions for Post and pre and then doing it, also I tried pasting them in variables and using these in the chart, but it doesnt seem to work. Any solution like we use, say if(ValueList(Pre,Post,Promo, Result, Index) = 'Index' 'Pre - Post/100. Please help me with this.&lt;/P&gt;&lt;P&gt;Thanks in Advance&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 01 Mar 2011 15:11:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculate-Index-from-an-expression-using-ValueList/m-p/234472#M85890</guid>
      <dc:creator />
      <dc:date>2011-03-01T15:11:41Z</dc:date>
    </item>
  </channel>
</rss>

