<?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: Different results with and without a Variable in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Different-results-with-and-without-a-Variable/m-p/1657829#M49243</link>
    <description>&lt;P&gt;is there a way to shorten all the time-dimensions?&lt;BR /&gt;[X_CAL.TimeStamp.Calendar.Year], [X_CAL.TimeStamp.Calendar.Quartal], [X_CAL.TimeStamp.Calendar.Month], [X_CAL.TimeStamp.Calendar.Week], [X_CAL.TimeStamp.Calendar.Day]&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I don't know why you need to use an aggr.&lt;/P&gt;&lt;P&gt;But if there is, is there a reason why just using only [X_CAL.TimeStamp.Calendar.Day]&amp;nbsp; doesn't work&lt;/P&gt;&lt;P&gt;Re shortening the name. Change the "Calendar" name in the script to Cal is one option&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sun, 15 Dec 2019 21:28:52 GMT</pubDate>
    <dc:creator>robert99</dc:creator>
    <dc:date>2019-12-15T21:28:52Z</dc:date>
    <item>
      <title>Different results with and without a Variable</title>
      <link>https://community.qlik.com/t5/App-Development/Different-results-with-and-without-a-Variable/m-p/1657800#M49238</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;Have two questions.&lt;/P&gt;&lt;P&gt;1. When putting a formula in a variable and use the variable in the app (e.g. in a chart) and on the other hand use the same formula directly in the app, the results is different. Don't understand why.&lt;/P&gt;&lt;P&gt;The correct numbers are like this below (putting the formular directly in the chart-app):&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="2019.1215-114552.jpg" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/25544i8D99B43AF67D67BB/image-size/medium?v=v2&amp;amp;px=400" role="button" title="2019.1215-114552.jpg" alt="2019.1215-114552.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;When going with the variable, all numbers are the same:&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="2019.1215-114641.jpg" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/25545i5C2CB9D3FAFB4F1F/image-size/medium?v=v2&amp;amp;px=400" role="button" title="2019.1215-114641.jpg" alt="2019.1215-114641.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;This is the formular:&lt;/P&gt;&lt;P&gt;1-(&lt;BR /&gt;(&lt;BR /&gt;Sum(Aggr(Count(Distinct {&amp;lt;[X_CAL.Calldirection]={'Inbound'}&amp;gt;} [%CallId]), [X_EVE.HuntGroup], [X_CAL.TimeStamp.Calendar.Year], [X_CAL.TimeStamp.Calendar.Quartal], [X_CAL.TimeStamp.Calendar.Month], [X_CAL.TimeStamp.Calendar.Week], [X_CAL.TimeStamp.Calendar.Day]))&lt;BR /&gt;-&lt;BR /&gt;Sum(Aggr(Count(Distinct {&amp;lt;[X_CAL.Calldirection]={'Inbound'}, [X_EVE.EventType]={'TALKING'}&amp;gt;} [%CallId]), [X_EVE.HuntGroup], [X_CAL.TimeStamp.Calendar.Year], [X_CAL.TimeStamp.Calendar.Quartal], [X_CAL.TimeStamp.Calendar.Month], [X_CAL.TimeStamp.Calendar.Week], [X_CAL.TimeStamp.Calendar.Day]))&lt;BR /&gt;-&lt;BR /&gt;Sum(Aggr(Count(Distinct {&amp;lt;[X_CAL.Calldirection]={'Inbound'}, [X_EVE.EventType]={'28'}&amp;gt;} [%CallId]), [X_EVE.HuntGroup], [X_CAL.TimeStamp.Calendar.Year], [X_CAL.TimeStamp.Calendar.Quartal], [X_CAL.TimeStamp.Calendar.Month], [X_CAL.TimeStamp.Calendar.Week], [X_CAL.TimeStamp.Calendar.Day]))&lt;BR /&gt;)&lt;BR /&gt;/&lt;BR /&gt;Sum(Aggr(Count(Distinct {&amp;lt;[X_CAL.Calldirection]={'Inbound'}&amp;gt;} [%CallId]), [X_EVE.HuntGroup], [X_CAL.TimeStamp.Calendar.Year], [X_CAL.TimeStamp.Calendar.Quartal], [X_CAL.TimeStamp.Calendar.Month], [X_CAL.TimeStamp.Calendar.Week], [X_CAL.TimeStamp.Calendar.Day]))&lt;BR /&gt;)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;2. and my second question:&lt;/P&gt;&lt;P&gt;is there a way to shorten all the time-dimensions?&lt;BR /&gt;[X_CAL.TimeStamp.Calendar.Year], [X_CAL.TimeStamp.Calendar.Quartal], [X_CAL.TimeStamp.Calendar.Month], [X_CAL.TimeStamp.Calendar.Week], [X_CAL.TimeStamp.Calendar.Day]&lt;/P&gt;&lt;P&gt;Have a period master-item, but don't know if it is possible to use it within a expression. so maybe I can avoid writing all the time dimensions many times.&lt;/P&gt;&lt;P&gt;thank you for your inputs and help.&lt;/P&gt;</description>
      <pubDate>Tue, 21 Dec 2021 22:06:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Different-results-with-and-without-a-Variable/m-p/1657800#M49238</guid>
      <dc:creator>george55</dc:creator>
      <dc:date>2021-12-21T22:06:32Z</dc:date>
    </item>
    <item>
      <title>Re: Different results with and without a Variable</title>
      <link>https://community.qlik.com/t5/App-Development/Different-results-with-and-without-a-Variable/m-p/1657813#M49240</link>
      <description>&lt;P&gt;In your variable definition, remove the leading "=".&amp;nbsp; That = causes the variable to be computed outside the chart.&amp;nbsp;&lt;/P&gt;&lt;P&gt;-Rob&lt;/P&gt;</description>
      <pubDate>Sun, 15 Dec 2019 16:33:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Different-results-with-and-without-a-Variable/m-p/1657813#M49240</guid>
      <dc:creator>rwunderlich</dc:creator>
      <dc:date>2019-12-15T16:33:05Z</dc:date>
    </item>
    <item>
      <title>Re: Different results with and without a Variable</title>
      <link>https://community.qlik.com/t5/App-Development/Different-results-with-and-without-a-Variable/m-p/1657829#M49243</link>
      <description>&lt;P&gt;is there a way to shorten all the time-dimensions?&lt;BR /&gt;[X_CAL.TimeStamp.Calendar.Year], [X_CAL.TimeStamp.Calendar.Quartal], [X_CAL.TimeStamp.Calendar.Month], [X_CAL.TimeStamp.Calendar.Week], [X_CAL.TimeStamp.Calendar.Day]&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I don't know why you need to use an aggr.&lt;/P&gt;&lt;P&gt;But if there is, is there a reason why just using only [X_CAL.TimeStamp.Calendar.Day]&amp;nbsp; doesn't work&lt;/P&gt;&lt;P&gt;Re shortening the name. Change the "Calendar" name in the script to Cal is one option&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 15 Dec 2019 21:28:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Different-results-with-and-without-a-Variable/m-p/1657829#M49243</guid>
      <dc:creator>robert99</dc:creator>
      <dc:date>2019-12-15T21:28:52Z</dc:date>
    </item>
    <item>
      <title>Re: Different results with and without a Variable</title>
      <link>https://community.qlik.com/t5/App-Development/Different-results-with-and-without-a-Variable/m-p/1658024#M49269</link>
      <description>&lt;P&gt;Hi Rob&lt;/P&gt;&lt;P&gt;When I remove the "=" then the variable become a string, no computation will be done. Maybe you mean to put the variable in the load script, not here (see Icon):&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="2019.1216-133930.jpg" style="width: 77px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/25589i5B3F76574338EF19/image-size/large?v=v2&amp;amp;px=999" role="button" title="2019.1216-133930.jpg" alt="2019.1216-133930.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;btw, is there a difference generating a variable in the loading script and in the app (see icon above)?&lt;/P&gt;&lt;P&gt;Thanks, George&lt;/P&gt;</description>
      <pubDate>Mon, 16 Dec 2019 12:47:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Different-results-with-and-without-a-Variable/m-p/1658024#M49269</guid>
      <dc:creator>george55</dc:creator>
      <dc:date>2019-12-16T12:47:02Z</dc:date>
    </item>
    <item>
      <title>Re: Different results with and without a Variable</title>
      <link>https://community.qlik.com/t5/App-Development/Different-results-with-and-without-a-Variable/m-p/1658028#M49271</link>
      <description>&lt;P&gt;Deleting all time-dimensions except of&amp;nbsp;&lt;SPAN&gt;[X_CAL.TimeStamp.Calendar.Day]&amp;nbsp;&amp;nbsp;does not work (see output below).&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;In the x-axis (group) there is a Week-dimension (1 - 52) and line is using the Year-dimension. alternative it can be used the Month-dimension.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="2019.1216-135056.jpg" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/25590iC6BE5C122C3D61C1/image-size/medium?v=v2&amp;amp;px=400" role="button" title="2019.1216-135056.jpg" alt="2019.1216-135056.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 16 Dec 2019 12:56:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Different-results-with-and-without-a-Variable/m-p/1658028#M49271</guid>
      <dc:creator>george55</dc:creator>
      <dc:date>2019-12-16T12:56:28Z</dc:date>
    </item>
    <item>
      <title>Re: Different results with and without a Variable</title>
      <link>https://community.qlik.com/t5/App-Development/Different-results-with-and-without-a-Variable/m-p/1658072#M49275</link>
      <description>&lt;P&gt;When you reference the variable in the chart measure, you will need to wrap it in $()&amp;nbsp;&lt;/P&gt;&lt;P&gt;$(myVar)&lt;/P&gt;&lt;P&gt;See&amp;nbsp;&lt;A href="https://community.qlik.com/qlik-blogpost/3406" target="_blank" rel="noopener"&gt;The Magic of Variables&lt;/A&gt;&lt;/P&gt;&lt;P&gt;-Rob&lt;/P&gt;</description>
      <pubDate>Mon, 16 Dec 2019 13:48:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Different-results-with-and-without-a-Variable/m-p/1658072#M49275</guid>
      <dc:creator>rwunderlich</dc:creator>
      <dc:date>2019-12-16T13:48:35Z</dc:date>
    </item>
    <item>
      <title>Re: Different results with and without a Variable</title>
      <link>https://community.qlik.com/t5/App-Development/Different-results-with-and-without-a-Variable/m-p/1658114#M49280</link>
      <description>&lt;P&gt;Rob, this was the solution. Did not know the rule without the "=". Thank you.&lt;/P&gt;&lt;P&gt;Can you give me some advise for my second question as well?&lt;/P&gt;&lt;P&gt;George&lt;/P&gt;</description>
      <pubDate>Mon, 16 Dec 2019 14:56:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Different-results-with-and-without-a-Variable/m-p/1658114#M49280</guid>
      <dc:creator>george55</dc:creator>
      <dc:date>2019-12-16T14:56:17Z</dc:date>
    </item>
    <item>
      <title>Re: Different results with and without a Variable</title>
      <link>https://community.qlik.com/t5/App-Development/Different-results-with-and-without-a-Variable/m-p/1658164#M49285</link>
      <description>&lt;P&gt;Re your second question.&amp;nbsp; You could put all those time dimensions in another variable and then use that variable in your expression variable.&amp;nbsp;&lt;/P&gt;&lt;P&gt;-Rob&lt;/P&gt;</description>
      <pubDate>Mon, 16 Dec 2019 17:51:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Different-results-with-and-without-a-Variable/m-p/1658164#M49285</guid>
      <dc:creator>rwunderlich</dc:creator>
      <dc:date>2019-12-16T17:51:52Z</dc:date>
    </item>
    <item>
      <title>Re: Different results with and without a Variable</title>
      <link>https://community.qlik.com/t5/App-Development/Different-results-with-and-without-a-Variable/m-p/1658342#M49306</link>
      <description>&lt;P&gt;Thanks Rob. Will do so.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is it maybe possible to use instead a Master Item with drilldown timeperiod dimension? There are all needed time dimensions in bundle.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="2019.1217-084645.jpg" style="width: 202px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/25638i4C41DE6DCA6DE3F5/image-size/large?v=v2&amp;amp;px=999" role="button" title="2019.1217-084645.jpg" alt="2019.1217-084645.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 17 Dec 2019 15:58:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Different-results-with-and-without-a-Variable/m-p/1658342#M49306</guid>
      <dc:creator>george55</dc:creator>
      <dc:date>2019-12-17T15:58:41Z</dc:date>
    </item>
    <item>
      <title>Re: Different results with and without a Variable</title>
      <link>https://community.qlik.com/t5/App-Development/Different-results-with-and-without-a-Variable/m-p/1658561#M49326</link>
      <description>&lt;P&gt;It appears to me that you are using the calendar dimensions as aggr dimensions to effectively aggregate by Date.&amp;nbsp; Do you have a Date field such that instead of listing all the Calendar fields you could just use the Date field in the Aggr()?&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;X_CAL.TimeStamp.Calendar.Date&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;-Rob&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 17 Dec 2019 15:19:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Different-results-with-and-without-a-Variable/m-p/1658561#M49326</guid>
      <dc:creator>rwunderlich</dc:creator>
      <dc:date>2019-12-17T15:19:39Z</dc:date>
    </item>
    <item>
      <title>Re: Different results with and without a Variable</title>
      <link>https://community.qlik.com/t5/App-Development/Different-results-with-and-without-a-Variable/m-p/1658582#M49343</link>
      <description>&lt;P&gt;Great Rob!&lt;/P&gt;&lt;P&gt;This was exactly what I was looking for. Thank you.&lt;/P&gt;&lt;P&gt;George&lt;/P&gt;</description>
      <pubDate>Tue, 17 Dec 2019 15:58:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Different-results-with-and-without-a-Variable/m-p/1658582#M49343</guid>
      <dc:creator>george55</dc:creator>
      <dc:date>2019-12-17T15:58:09Z</dc:date>
    </item>
  </channel>
</rss>

