<?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: Error in calculated dimension in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Error-in-calculated-dimension/m-p/1063153#M931829</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You cannot use Aggregation functions in Dimension directly, but you can use these functions with Aggr() applied over it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;try this&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13.3333px;"&gt;aggr((sum(INV_AMT)-sum(MATERIAL_COST))/sum(INV_AMT), SUB_GROUP) * 100&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 14 Mar 2016 08:34:36 GMT</pubDate>
    <dc:creator>Kushal_Chawda</dc:creator>
    <dc:date>2016-03-14T08:34:36Z</dc:date>
    <item>
      <title>Error in calculated dimension</title>
      <link>https://community.qlik.com/t5/QlikView/Error-in-calculated-dimension/m-p/1063151#M931827</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Dear Experts,&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Our current Chart designed as below.&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Dimension #1 : Period&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Dimension #2 : Subgroup&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Expression :&amp;nbsp; Total sales amount&amp;nbsp; [=sum(INV_AMT)]&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: inherit; font-size: 13.3333px; font-weight: inherit; font-style: inherit;"&gt;But our exact requirement is to show profit range as &lt;/SPAN&gt;&lt;SPAN style="color: #3d3d3d; font-size: 13.3333px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;dimension (as it's a calculated value, need to use expression : =((sum(INV_AMT)-sum(MATERIAL_COST))/sum(INV_AMT))*100.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-size: 13.3333px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;When I use this expression as a dimension, I'm getting a single bar in the chart with 'Error in calculated dimension' message.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 13.3333px; font-family: inherit;"&gt;Kindly advise.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 13.3333px; font-family: inherit;"&gt;Thanks,&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 13.3333px; font-family: inherit;"&gt;Saravanan&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Nov 2020 16:16:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Error-in-calculated-dimension/m-p/1063151#M931827</guid>
      <dc:creator />
      <dc:date>2020-11-25T16:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: Error in calculated dimension</title>
      <link>https://community.qlik.com/t5/QlikView/Error-in-calculated-dimension/m-p/1063152#M931828</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Directly you cannot use the sum function in the dimension... you need to use the Aggr() function around it then only it will work&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I don't you exact requirement but you can play with the below expression and modify accordingly&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13.3333px;"&gt;=( Aggr(sum(INV_AMT) - sum(MATERIAL_COST), &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Period,&lt;/SPAN&gt; &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Subgroup&lt;/SPAN&gt;) / Aggr(sum(INV_AMT),&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Period,&lt;/SPAN&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13.3333px;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Subgroup&lt;/SPAN&gt;) )*100.&lt;/SPAN&gt;&amp;nbsp; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Mar 2016 08:14:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Error-in-calculated-dimension/m-p/1063152#M931828</guid>
      <dc:creator>avinashelite</dc:creator>
      <dc:date>2016-03-14T08:14:07Z</dc:date>
    </item>
    <item>
      <title>Re: Error in calculated dimension</title>
      <link>https://community.qlik.com/t5/QlikView/Error-in-calculated-dimension/m-p/1063153#M931829</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You cannot use Aggregation functions in Dimension directly, but you can use these functions with Aggr() applied over it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;try this&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13.3333px;"&gt;aggr((sum(INV_AMT)-sum(MATERIAL_COST))/sum(INV_AMT), SUB_GROUP) * 100&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Mar 2016 08:34:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Error-in-calculated-dimension/m-p/1063153#M931829</guid>
      <dc:creator>Kushal_Chawda</dc:creator>
      <dc:date>2016-03-14T08:34:36Z</dc:date>
    </item>
    <item>
      <title>Re: Error in calculated dimension</title>
      <link>https://community.qlik.com/t5/QlikView/Error-in-calculated-dimension/m-p/1063154#M931830</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try using Aggr() like below&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13.3333px;"&gt;=Aggr(((sum(INV_AMT)-sum(MATERIAL_COST))/sum(INV_AMT))*100, &lt;/SPAN&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px; line-height: 1.5em;"&gt;Period, &lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit;"&gt;Subgroup)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit;"&gt;Regards,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit;"&gt;Jagan.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Mar 2016 08:50:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Error-in-calculated-dimension/m-p/1063154#M931830</guid>
      <dc:creator>jagan</dc:creator>
      <dc:date>2016-03-14T08:50:31Z</dc:date>
    </item>
  </channel>
</rss>

