<?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: Calculated Dimension... based on condition... in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Calculated-Dimension-based-on-condition/m-p/333437#M573849</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Mathew,&lt;/P&gt;&lt;P&gt;I would create a table for diferent kind of age goups.&lt;/P&gt;&lt;P&gt;&lt;IMG class="jiveImage" height="333" src="https://community.qlik.com/" style="max-width: 1200px; max-height: 900px;" width="448" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now you can control if there is a age group type selected or not in the chart:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG class="jiveImage" height="391" src="https://community.qlik.com/" style="max-width: 1200px; max-height: 900px;" width="570" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Finally you can use conditional view for the diferent age groups in the dimension sheet.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG class="jiveImage" height="427" src="https://community.qlik.com/" style="max-width: 1200px; max-height: 900px;" width="583" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I used this expression.&lt;/P&gt;&lt;P&gt;=SubStringCount(Concat(_dimension, '|'), 'Grupo 1')&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've developed a very small example to test it. If you send me an email I can send you by email.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I found this technique in this demo:&lt;/P&gt;&lt;P&gt;&lt;A class="loading" href="http://eu.demo.qlik.com/detail.aspx?appName=Whats%20New%20in%20QlikView11.qvw" title="http://eu.demo.qlik.com/detail.aspx?appName=Whats%20New%20in%20QlikView11.qvw"&gt;http://eu.demo.qlik.com/detail.aspx?appName=Whats%20New%20in%20QlikView11.qvw&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regads, F.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 04 Jul 2012 10:25:57 GMT</pubDate>
    <dc:creator>Ferran_Garcia_Pagans</dc:creator>
    <dc:date>2012-07-04T10:25:57Z</dc:date>
    <item>
      <title>Calculated Dimension... based on condition...</title>
      <link>https://community.qlik.com/t5/QlikView/Calculated-Dimension-based-on-condition/m-p/333434#M573846</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;I have a dataset containing the ages of a bunch of people. I also have these linked to Age Groups, i.e 0-10, 11-20, 21-30 etc etc. I have multiple Age Group Types, so the age group type described previously was 10 year incremental, but i also have a 5 year incremental group (0-5, 6-10, 11-15 etc etc), plus others.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a chart with the dimensions AgeGroup &amp;amp; Gender. The expression is a simple count.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For the chart to display correctly, i need to either select a single AgeGroupType, Or, Add the equivalent set analysis into my expression. What i WANT to acheive is...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If a single AgeGroupType is NOT selected then by default use AgeGroupType X, else use whatever AgeGroupType is selected.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've tried building an 'If' statement into my expression but it just didnt work. it was something like...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If(Count({$} Distinct [AgeGroupTypeName])=5&lt;/P&gt;&lt;P&gt;//Then&lt;/P&gt;&lt;P&gt;,Count(DISTINCT{$&amp;lt;AgeGroupTypeName={'Ten-year intevals'}&amp;gt;}EpisodeId)&lt;/P&gt;&lt;P&gt;//Else&lt;/P&gt;&lt;P&gt;,Count(DISTINCT{$}EpisodeId)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-Mathew&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Jul 2012 09:31:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculated-Dimension-based-on-condition/m-p/333434#M573846</guid>
      <dc:creator />
      <dc:date>2012-07-04T09:31:37Z</dc:date>
    </item>
    <item>
      <title>Re: Calculated Dimension... based on condition...</title>
      <link>https://community.qlik.com/t5/QlikView/Calculated-Dimension-based-on-condition/m-p/333435#M573847</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;You could try this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If(GetSelectedCount(AgeGroupTypeName) &amp;lt;&amp;gt; 1,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Count({&amp;lt;AgeGroupTypeName = {'Ten-year intervals'}&amp;gt;} DISTINCT EpisodeId),&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Count({&amp;lt;AgeGroupTypeName = {"$(=GetFieldSelections(AgeGroupTypeName))"}&amp;gt;} DISTINCT EpisodeId))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This should use 'Ten-year intervals' unless exactly one AgeGroupTypeName is selected, in whih case it should use the selecetd one.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope that helps&lt;/P&gt;&lt;P&gt;Jonathan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Jul 2012 09:52:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculated-Dimension-based-on-condition/m-p/333435#M573847</guid>
      <dc:creator>jonathandienst</dc:creator>
      <dc:date>2012-07-04T09:52:10Z</dc:date>
    </item>
    <item>
      <title>Re: Calculated Dimension... based on condition...</title>
      <link>https://community.qlik.com/t5/QlikView/Calculated-Dimension-based-on-condition/m-p/333436#M573848</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Awesome Thanks Jonathan. I was on the right track i just needed guiding. &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Jul 2012 10:07:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculated-Dimension-based-on-condition/m-p/333436#M573848</guid>
      <dc:creator />
      <dc:date>2012-07-04T10:07:41Z</dc:date>
    </item>
    <item>
      <title>Re: Calculated Dimension... based on condition...</title>
      <link>https://community.qlik.com/t5/QlikView/Calculated-Dimension-based-on-condition/m-p/333437#M573849</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Mathew,&lt;/P&gt;&lt;P&gt;I would create a table for diferent kind of age goups.&lt;/P&gt;&lt;P&gt;&lt;IMG class="jiveImage" height="333" src="https://community.qlik.com/" style="max-width: 1200px; max-height: 900px;" width="448" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now you can control if there is a age group type selected or not in the chart:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG class="jiveImage" height="391" src="https://community.qlik.com/" style="max-width: 1200px; max-height: 900px;" width="570" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Finally you can use conditional view for the diferent age groups in the dimension sheet.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG class="jiveImage" height="427" src="https://community.qlik.com/" style="max-width: 1200px; max-height: 900px;" width="583" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I used this expression.&lt;/P&gt;&lt;P&gt;=SubStringCount(Concat(_dimension, '|'), 'Grupo 1')&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've developed a very small example to test it. If you send me an email I can send you by email.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I found this technique in this demo:&lt;/P&gt;&lt;P&gt;&lt;A class="loading" href="http://eu.demo.qlik.com/detail.aspx?appName=Whats%20New%20in%20QlikView11.qvw" title="http://eu.demo.qlik.com/detail.aspx?appName=Whats%20New%20in%20QlikView11.qvw"&gt;http://eu.demo.qlik.com/detail.aspx?appName=Whats%20New%20in%20QlikView11.qvw&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regads, F.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Jul 2012 10:25:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculated-Dimension-based-on-condition/m-p/333437#M573849</guid>
      <dc:creator>Ferran_Garcia_Pagans</dc:creator>
      <dc:date>2012-07-04T10:25:57Z</dc:date>
    </item>
  </channel>
</rss>

