<?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: Dynamic (based on variable) status as a dimension? in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Dynamic-based-on-variable-status-as-a-dimension/m-p/449000#M167553</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Guillaume,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If I understand correctly and you want a pie chart that shows the number of reports that should be kept and the number that should be decommissioned, based on your threshold, try creating a pie chart with the dimension and expression as follows - &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Dimension&lt;/P&gt;&lt;P&gt;=if(aggr(sum(Hits),Report)&amp;lt;vThreshold,'Decomission','Keep')&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Expression&lt;/P&gt;&lt;P&gt;=count(Report)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope that's what you need.&lt;/P&gt;&lt;P&gt;Ben&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 12 Apr 2013 16:57:13 GMT</pubDate>
    <dc:creator />
    <dc:date>2013-04-12T16:57:13Z</dc:date>
    <item>
      <title>Dynamic (based on variable) status as a dimension?</title>
      <link>https://community.qlik.com/t5/QlikView/Dynamic-based-on-variable-status-as-a-dimension/m-p/448999#M167552</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a document with data representing report usage. The basic structure is :&lt;/P&gt;&lt;P&gt;- &lt;SPAN style="font-family: 'courier new', courier;"&gt;Report&lt;/SPAN&gt; (the name of the report)&lt;/P&gt;&lt;P&gt;- &lt;SPAN style="font-family: 'courier new', courier;"&gt;User&lt;/SPAN&gt; (the username)&lt;/P&gt;&lt;P&gt;- &lt;SPAN style="font-family: 'courier new', courier;"&gt;Hits&lt;/SPAN&gt; (the number of times this user has launched thie report)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The document presents a table with one row per Report and the total of Hits (defined as &lt;SPAN style="font-family: 'courier new', courier;"&gt;Sum(Hits)&lt;/SPAN&gt;&lt;SPAN&gt;). There is a slider linked to the variable &lt;SPAN style="font-family: 'courier new', courier;"&gt;vThreshold&lt;/SPAN&gt; used to determine what Report would be decommissioned. I created the variable &lt;SPAN style="font-family: 'courier new', courier;"&gt;vCommissionStatus&lt;/SPAN&gt; as &lt;SPAN style="font-family: 'courier new', courier;"&gt;If(Sum(TOTAL &amp;lt;Report&amp;gt; Hits) &amp;gt;= vThreshold, 'Keep', 'Decommission')&lt;SPAN style="font-family: arial, helvetica, sans-serif;"&gt;.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial, helvetica, sans-serif;"&gt;Using this variable works well for displaying purposes as well as for text coloring conditions ; Background color has the following value: &lt;SPAN style="font-family: 'courier new', courier;"&gt;=If($(vCommissionStatus) = 'Decommission', Red(), Green())&lt;/SPAN&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial, helvetica, sans-serif;"&gt;Now I'd like to display a pie chart to show the part of reports that should be decommissionned if we decide to use the given treshold. I tried to use =$(vCommissionStatus) as a calculated dimension for the pie chart but it doesn't work. Actually, it seems I can't use this variable as a calculated dimension anywhere.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial, helvetica, sans-serif;"&gt;Is there a way to use the commision status as a dimension? How can this be done?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial, helvetica, sans-serif;"&gt;Regards&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial, helvetica, sans-serif;"&gt;Guillaume&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 12 Apr 2013 13:04:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Dynamic-based-on-variable-status-as-a-dimension/m-p/448999#M167552</guid>
      <dc:creator />
      <dc:date>2013-04-12T13:04:04Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic (based on variable) status as a dimension?</title>
      <link>https://community.qlik.com/t5/QlikView/Dynamic-based-on-variable-status-as-a-dimension/m-p/449000#M167553</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Guillaume,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If I understand correctly and you want a pie chart that shows the number of reports that should be kept and the number that should be decommissioned, based on your threshold, try creating a pie chart with the dimension and expression as follows - &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Dimension&lt;/P&gt;&lt;P&gt;=if(aggr(sum(Hits),Report)&amp;lt;vThreshold,'Decomission','Keep')&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Expression&lt;/P&gt;&lt;P&gt;=count(Report)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope that's what you need.&lt;/P&gt;&lt;P&gt;Ben&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 12 Apr 2013 16:57:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Dynamic-based-on-variable-status-as-a-dimension/m-p/449000#M167553</guid>
      <dc:creator />
      <dc:date>2013-04-12T16:57:13Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic (based on variable) status as a dimension?</title>
      <link>https://community.qlik.com/t5/QlikView/Dynamic-based-on-variable-status-as-a-dimension/m-p/449001#M167554</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm struggling with a similar issue.&amp;nbsp; I tried your solution, but I'm finding that the expression won't split my counts into the categories set by the dimension.&amp;nbsp; In other words, the entire population shows up in each category.&amp;nbsp; Any thoughts?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 May 2013 14:10:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Dynamic-based-on-variable-status-as-a-dimension/m-p/449001#M167554</guid>
      <dc:creator />
      <dc:date>2013-05-24T14:10:17Z</dc:date>
    </item>
  </channel>
</rss>

