<?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 Calculated dimensions in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Calculated-dimensions/m-p/186679#M50685</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Johann,&lt;/P&gt;&lt;P&gt;You can select all values not selected in one dimension by right clicking on the listbox and select excluded values, or check in the properties of the listbox "Include Excluded Values in Search"&lt;/P&gt;&lt;P&gt;I'd use a different expression with set analysis to show those values only, a very simple example of that would be&lt;/P&gt;&lt;BLOCKQUOTE style="overflow-x: scroll;"&gt;&lt;PRE style="margin: 0px;"&gt;Sum({&amp;lt; Sales = {"&amp;gt;2500000"} &amp;gt;} Sales)&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;. If you want to show not a listbox but a chart with all values that do not accomplish some of your criteria you can do something like &lt;BLOCKQUOTE style="overflow-x: scroll;"&gt;&lt;PRE style="margin: 0px;"&gt;Sum({&amp;lt; Year -= {2010} &amp;gt;} Sales)&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;which will exclude all records with 2010 as value in Year field. &lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;You can create as well a "flag field" in your script given that threshold, but I think you want that parameter to be variable, so this idea won't be very effective.&lt;/P&gt;&lt;P&gt;Simplifying, a calculated dimension has to do with operations with fields (not aggregations) such as&lt;/P&gt;&lt;BLOCKQUOTE style="overflow-x: scroll;"&gt;&lt;PRE style="margin: 0px;"&gt;Year(Date)&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;as Year dimension (if you don't have any), or &lt;BLOCKQUOTE style="overflow-x: scroll;"&gt;&lt;PRE style="margin: 0px;"&gt;left(CompanyCode, 3)&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;as Initials or County Code... The more you complicate this dimensions, the longer your performance will take. It's better to pass all the work on to expressions, and using set analysis when possible, combined with the load script. &lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;Regards.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 19 Mar 2010 10:21:51 GMT</pubDate>
    <dc:creator>Miguel_Angel_Baeyens</dc:creator>
    <dc:date>2010-03-19T10:21:51Z</dc:date>
    <item>
      <title>Calculated dimensions</title>
      <link>https://community.qlik.com/t5/QlikView/Calculated-dimensions/m-p/186678#M50684</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The concept of calculated dimensions is not quit clear to me. I have 2 issues with dimensions that I can't solve :&lt;/P&gt;&lt;P&gt;- Is it possible to add a calculated dimension that contains values that are not selected&lt;/P&gt;&lt;P&gt;e.g.: You select 1 year 1 month in your application and you want to view a bar chart with 6 months until the selected month . The image below is what we need to achieve if 2010-03 is selected&lt;/P&gt;&lt;P&gt;&lt;IMG alt="error loading image" class="jive-image error-loading-image" src="https://community.qlik.com/legacyfs/online/-1263_sourceID:1263" /&gt;&lt;/P&gt;&lt;P&gt;- Is it possible to only show dimension members with sales greater then a given treshhold ( cf "having sum(sales) &amp;gt; &lt;EM&gt;number&lt;/EM&gt; in SQL)&lt;/P&gt;&lt;P&gt;e.g.: In the image above we only wish to see 201001 and 201002 which are greater then 2.500.000&lt;/P&gt;&lt;P&gt;Can some help pls.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Mar 2010 09:16:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculated-dimensions/m-p/186678#M50684</guid>
      <dc:creator />
      <dc:date>2010-03-19T09:16:28Z</dc:date>
    </item>
    <item>
      <title>Calculated dimensions</title>
      <link>https://community.qlik.com/t5/QlikView/Calculated-dimensions/m-p/186679#M50685</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Johann,&lt;/P&gt;&lt;P&gt;You can select all values not selected in one dimension by right clicking on the listbox and select excluded values, or check in the properties of the listbox "Include Excluded Values in Search"&lt;/P&gt;&lt;P&gt;I'd use a different expression with set analysis to show those values only, a very simple example of that would be&lt;/P&gt;&lt;BLOCKQUOTE style="overflow-x: scroll;"&gt;&lt;PRE style="margin: 0px;"&gt;Sum({&amp;lt; Sales = {"&amp;gt;2500000"} &amp;gt;} Sales)&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;. If you want to show not a listbox but a chart with all values that do not accomplish some of your criteria you can do something like &lt;BLOCKQUOTE style="overflow-x: scroll;"&gt;&lt;PRE style="margin: 0px;"&gt;Sum({&amp;lt; Year -= {2010} &amp;gt;} Sales)&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;which will exclude all records with 2010 as value in Year field. &lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;You can create as well a "flag field" in your script given that threshold, but I think you want that parameter to be variable, so this idea won't be very effective.&lt;/P&gt;&lt;P&gt;Simplifying, a calculated dimension has to do with operations with fields (not aggregations) such as&lt;/P&gt;&lt;BLOCKQUOTE style="overflow-x: scroll;"&gt;&lt;PRE style="margin: 0px;"&gt;Year(Date)&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;as Year dimension (if you don't have any), or &lt;BLOCKQUOTE style="overflow-x: scroll;"&gt;&lt;PRE style="margin: 0px;"&gt;left(CompanyCode, 3)&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;as Initials or County Code... The more you complicate this dimensions, the longer your performance will take. It's better to pass all the work on to expressions, and using set analysis when possible, combined with the load script. &lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;Regards.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Mar 2010 10:21:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculated-dimensions/m-p/186679#M50685</guid>
      <dc:creator>Miguel_Angel_Baeyens</dc:creator>
      <dc:date>2010-03-19T10:21:51Z</dc:date>
    </item>
    <item>
      <title>Calculated dimensions</title>
      <link>https://community.qlik.com/t5/QlikView/Calculated-dimensions/m-p/186680#M50686</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This is not what I ment.&lt;/P&gt;&lt;P&gt;- I only want to select 1 month (eg. 2010-03) in a list box and the chart should show the 6 months before 2010-03 (2009-10,2009-11,2009-12,2010-01,2010-02,2010-03). This means the content of the dimension of the graph should be dynamic.&lt;/P&gt;&lt;P&gt;- The "having"-SQLstatement that I wish to achieve is a bit more complex: I am trying to create a table with only the dates where there is a difference between ticket sales and ticket cash. In SQL it would look like : select date,sum(sales)-sum(cash) from tickets having sum(sales)-sum(cash) &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;P&gt;In qlikview I created a table with the dimension date and the expression sum(sales)-sum(cash) which resulted in the image below. I now only want to see the dates where "Difference" &amp;lt;&amp;gt; 0 (meaning 05/01, 07/01, 09/01 and 10/01)&lt;/P&gt;&lt;P&gt;&lt;A href="http://community.qlik.com/cfs-file.ashx/__key/CommunityServer.Discussions.Components.Files/11/0640.graph.JPG"&gt;&lt;IMG alt="" border="0" src="http://community.qlik.com/resized-image.ashx/__size/550x0/__key/CommunityServer.Discussions.Components.Files/11/0640.graph.JPG" /&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Greets&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Mar 2010 11:27:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculated-dimensions/m-p/186680#M50686</guid>
      <dc:creator />
      <dc:date>2010-03-19T11:27:58Z</dc:date>
    </item>
    <item>
      <title>Calculated dimensions</title>
      <link>https://community.qlik.com/t5/QlikView/Calculated-dimensions/m-p/186681#M50687</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Johan,&lt;/P&gt;&lt;P&gt;Not sure that Calculated Dimension is what you need. Rather modifying your expression should do what you want and leave Month as the only dimension.&lt;/P&gt;&lt;P&gt;For your first issue - assuming you can't have the user simply select 6 months - extending the date range back 6 months from the selected month you can use Set Analysis. Check Help doco for more details.&lt;/P&gt;&lt;P&gt;Something like Sum({$&amp;lt;Month = {"&amp;gt;$(vLess6Months)&amp;lt;=$(vMaxMonth)"} &amp;gt;} Sales)&lt;/P&gt;&lt;P&gt;vLess6Months and vMaxMonth are variables. I sometimes have issue with date representation so make sure the variables calculate same format as Month, eg.&lt;/P&gt;&lt;P&gt;vLess6Months = =Date(MonthStart(Min(Month),-6),'YYYYMM') , vMaxMonth = Date(MonthEnd(Max(Month)),'YYYYMM')&lt;/P&gt;&lt;P&gt;Assumes you hold Month as YYYYMM in your file.&lt;/P&gt;&lt;P&gt;For second issue, various ways, one would be extending your expression to be.&lt;/P&gt;&lt;P&gt;If(Sum({$&amp;lt;Month = {"&amp;gt;$(vLess6Months)&amp;lt;=$(vMaxMonth)"} &amp;gt;} Sales) &amp;gt; 250000,&lt;/P&gt;&lt;P&gt;Sum({$&amp;lt;Month = {"&amp;gt;$(vLess6Months)&amp;lt;=$(vMaxMonth)"} &amp;gt;} Sales),Null())&lt;/P&gt;&lt;P&gt;This will return Null for the months &amp;lt; 2.5m.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Mar 2010 11:32:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculated-dimensions/m-p/186681#M50687</guid>
      <dc:creator>michael_anthony</dc:creator>
      <dc:date>2010-03-19T11:32:21Z</dc:date>
    </item>
    <item>
      <title>Calculated dimensions</title>
      <link>https://community.qlik.com/t5/QlikView/Calculated-dimensions/m-p/186682#M50688</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Johann,&lt;/P&gt;&lt;P&gt;Now I get your point. Michael's approach is good enough.&lt;/P&gt;&lt;P&gt;Regards.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Mar 2010 12:43:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculated-dimensions/m-p/186682#M50688</guid>
      <dc:creator>Miguel_Angel_Baeyens</dc:creator>
      <dc:date>2010-03-19T12:43:50Z</dc:date>
    </item>
    <item>
      <title>Calculated dimensions</title>
      <link>https://community.qlik.com/t5/QlikView/Calculated-dimensions/m-p/186683#M50689</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I've found a solution for problem number 2:&lt;/P&gt;&lt;BLOCKQUOTE style="overflow-x:scroll;"&gt;&lt;PRE style="margin:0px;"&gt;if(sum(sales)-sum(cash)&amp;lt;&amp;gt;0,Null(),sum(sales)-sum(cash))&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;Problem number 1 still remains unsolved. I don't even know if it is possible.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Mar 2010 14:42:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculated-dimensions/m-p/186683#M50689</guid>
      <dc:creator />
      <dc:date>2010-03-19T14:42:55Z</dc:date>
    </item>
    <item>
      <title>Calculated dimensions</title>
      <link>https://community.qlik.com/t5/QlikView/Calculated-dimensions/m-p/186684#M50690</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Set Analysis will solve problem 1. Can apply same logic in each Sum function you have listed.&lt;/P&gt;&lt;P&gt;Use Sum({$&amp;lt;Month = {"&amp;gt;$(vLess6Months)&amp;lt;=$(vMaxMonth)"} &amp;gt;} Sales)&lt;/P&gt;&lt;P&gt;vLess6Months and vMaxMonth are variables. I sometimes have issue with date representation so make sure the variables calculate same format as Month, eg.&lt;/P&gt;&lt;P&gt;vLess6Months = =Date(MonthStart(Min(Month),-6),'YYYYMM') , vMaxMonth = Date(MonthEnd(Max(Month)),'YYYYMM')&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 20 Mar 2010 02:11:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculated-dimensions/m-p/186684#M50690</guid>
      <dc:creator>michael_anthony</dc:creator>
      <dc:date>2010-03-20T02:11:23Z</dc:date>
    </item>
    <item>
      <title>Calculated dimensions</title>
      <link>https://community.qlik.com/t5/QlikView/Calculated-dimensions/m-p/186685#M50691</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I have a similar requirement.&lt;/P&gt;&lt;P&gt;The only thing is the Date selection is also dynamic.&lt;/P&gt;&lt;P&gt;How can I get the selected date in the SET analysis instead of vLess6Months.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Chinmay&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 Mar 2011 09:22:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculated-dimensions/m-p/186685#M50691</guid>
      <dc:creator />
      <dc:date>2011-03-02T09:22:24Z</dc:date>
    </item>
  </channel>
</rss>

