<?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: Expression to use for 'Comparable' Locations in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Expression-to-use-for-Comparable-Locations/m-p/1199257#M22665</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I guess this solution doesn't work after all:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Avg({&amp;lt;[Comp_Flag] = {1}&amp;gt;} [CY TP 13])/Avg([PY TP 13])-1&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The % change for a small group of 9 locations I tested gave me incorrect results.....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can anyone please help me?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks.....&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 03 Oct 2016 20:23:18 GMT</pubDate>
    <dc:creator>msawyercke</dc:creator>
    <dc:date>2016-10-03T20:23:18Z</dc:date>
    <item>
      <title>Expression to use for 'Comparable' Locations</title>
      <link>https://community.qlik.com/t5/App-Development/Expression-to-use-for-Comparable-Locations/m-p/1199252#M22660</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Good Morning!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I load data for each of our locations that contains sales performance.&amp;nbsp; It is structured like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Unit #&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;Current Year Sales ("CY TP 13")&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;Year Ago Sales&amp;nbsp;&amp;nbsp; ("PY TP 13")&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;From there, I use the following formula to highlight % Change Vs Ya&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;AVG ([CY TP 13])/avg([PY TP 13])-1&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The problem is, I need to create a chart (perhaps a TreeMap), that only displays the data of 'comparable' locations, since some locations that are reporting sales this year weren't open last year, distorting the % change statistic.&amp;nbsp; In other words, I want to calculate locations where &lt;SPAN style="font-size: 13.3333px;"&gt;PY TP 13&amp;gt;0.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In my example, what would the expression be in the expression editor?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for any help that can be provided?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 03 Oct 2016 16:22:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Expression-to-use-for-Comparable-Locations/m-p/1199252#M22660</guid>
      <dc:creator>msawyercke</dc:creator>
      <dc:date>2016-10-03T16:22:30Z</dc:date>
    </item>
    <item>
      <title>Re: Expression to use for 'Comparable' Locations</title>
      <link>https://community.qlik.com/t5/App-Development/Expression-to-use-for-Comparable-Locations/m-p/1199253#M22661</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Check this link out and see if this helps (have not dig deeper, but it seems that this might help you)&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.qlik.com/docs/DOC-5178"&gt;Like For Like (Comparative) Sales Analysis (Flag Method)&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 03 Oct 2016 16:43:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Expression-to-use-for-Comparable-Locations/m-p/1199253#M22661</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-10-03T16:43:22Z</dc:date>
    </item>
    <item>
      <title>Re: Expression to use for 'Comparable' Locations</title>
      <link>https://community.qlik.com/t5/App-Development/Expression-to-use-for-Comparable-Locations/m-p/1199254#M22662</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks, Sunny.&amp;nbsp; I think you are on the right track...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So, I created the following following phrase in the script editor:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt; IF ("PY TP 13" &amp;gt;0, 1, 0) as Comp_Flag&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But, now in the Expression editor in the chart, I use this expression, and there is an error somewhere:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;AVG [Comp_Flag](([CY TP 13])/avg([PY TP 13])-1)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Do you see anything wrong with my approach or expression?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Many, Many thanks!!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 03 Oct 2016 17:31:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Expression-to-use-for-Comparable-Locations/m-p/1199254#M22662</guid>
      <dc:creator>msawyercke</dc:creator>
      <dc:date>2016-10-03T17:31:03Z</dc:date>
    </item>
    <item>
      <title>Re: Expression to use for 'Comparable' Locations</title>
      <link>https://community.qlik.com/t5/App-Development/Expression-to-use-for-Comparable-Locations/m-p/1199255#M22663</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am not sure if the flag itself is right or not, but may be you can use it like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Avg(&lt;SPAN style="color: #ff0000;"&gt;{&amp;lt;[Comp_Flag] = {1}&amp;gt;}&lt;/SPAN&gt; [CY TP 13])/Avg([PY TP 13])-1)&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 03 Oct 2016 19:05:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Expression-to-use-for-Comparable-Locations/m-p/1199255#M22663</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-10-03T19:05:14Z</dc:date>
    </item>
    <item>
      <title>Re: Expression to use for 'Comparable' Locations</title>
      <link>https://community.qlik.com/t5/App-Development/Expression-to-use-for-Comparable-Locations/m-p/1199256#M22664</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think this worked, Sunny.&amp;nbsp; I still need to verify the results, but at least the syntax is correct and it is making the calculations and displaying the graph.&amp;nbsp; I just need to validate the results on this end.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks - have a S U N N Y day!&amp;nbsp;&amp;nbsp; &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 03 Oct 2016 19:46:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Expression-to-use-for-Comparable-Locations/m-p/1199256#M22664</guid>
      <dc:creator>msawyercke</dc:creator>
      <dc:date>2016-10-03T19:46:17Z</dc:date>
    </item>
    <item>
      <title>Re: Expression to use for 'Comparable' Locations</title>
      <link>https://community.qlik.com/t5/App-Development/Expression-to-use-for-Comparable-Locations/m-p/1199257#M22665</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I guess this solution doesn't work after all:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Avg({&amp;lt;[Comp_Flag] = {1}&amp;gt;} [CY TP 13])/Avg([PY TP 13])-1&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The % change for a small group of 9 locations I tested gave me incorrect results.....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can anyone please help me?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks.....&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 03 Oct 2016 20:23:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Expression-to-use-for-Comparable-Locations/m-p/1199257#M22665</guid>
      <dc:creator>msawyercke</dc:creator>
      <dc:date>2016-10-03T20:23:18Z</dc:date>
    </item>
    <item>
      <title>Re: Expression to use for 'Comparable' Locations</title>
      <link>https://community.qlik.com/t5/App-Development/Expression-to-use-for-Comparable-Locations/m-p/1199258#M22666</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am sure willing to, would it be possible to share a sample?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 03 Oct 2016 20:31:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Expression-to-use-for-Comparable-Locations/m-p/1199258#M22666</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-10-03T20:31:58Z</dc:date>
    </item>
    <item>
      <title>Re: Expression to use for 'Comparable' Locations</title>
      <link>https://community.qlik.com/t5/App-Development/Expression-to-use-for-Comparable-Locations/m-p/1199259#M22667</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sure I will, Sunny.&amp;nbsp; You are so kind again....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The "correct" % change should be +1.9%.&amp;nbsp; In my bar graph, it shows up as 30%+&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Let me know if you need anything else.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 03 Oct 2016 20:38:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Expression-to-use-for-Comparable-Locations/m-p/1199259#M22667</guid>
      <dc:creator>msawyercke</dc:creator>
      <dc:date>2016-10-03T20:38:12Z</dc:date>
    </item>
    <item>
      <title>Re: Expression to use for 'Comparable' Locations</title>
      <link>https://community.qlik.com/t5/App-Development/Expression-to-use-for-Comparable-Locations/m-p/1199260#M22668</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;And here is what the graph displays when I select the market for that group of locations&lt;IMG alt="Capture.JPG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/139494_Capture.JPG" style="height: auto;" /&gt;:&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 03 Oct 2016 20:47:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Expression-to-use-for-Comparable-Locations/m-p/1199260#M22668</guid>
      <dc:creator>msawyercke</dc:creator>
      <dc:date>2016-10-03T20:47:50Z</dc:date>
    </item>
    <item>
      <title>Re: Expression to use for 'Comparable' Locations</title>
      <link>https://community.qlik.com/t5/App-Development/Expression-to-use-for-Comparable-Locations/m-p/1199261#M22669</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;How are you calculating 1.9% here? are you doing Average of % Change?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 03 Oct 2016 20:48:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Expression-to-use-for-Comparable-Locations/m-p/1199261#M22669</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-10-03T20:48:14Z</dc:date>
    </item>
    <item>
      <title>Re: Expression to use for 'Comparable' Locations</title>
      <link>https://community.qlik.com/t5/App-Development/Expression-to-use-for-Comparable-Locations/m-p/1199262#M22670</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I sum CY, then Sum LY, then use the formula (Sum CY/Sum LY)-1&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 03 Oct 2016 20:50:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Expression-to-use-for-Comparable-Locations/m-p/1199262#M22670</guid>
      <dc:creator>msawyercke</dc:creator>
      <dc:date>2016-10-03T20:50:48Z</dc:date>
    </item>
    <item>
      <title>Re: Expression to use for 'Comparable' Locations</title>
      <link>https://community.qlik.com/t5/App-Development/Expression-to-use-for-Comparable-Locations/m-p/1199263#M22671</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;IMG alt="Capture.JPG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/139495_Capture.JPG" style="height: 245px; width: 620px;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 03 Oct 2016 20:54:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Expression-to-use-for-Comparable-Locations/m-p/1199263#M22671</guid>
      <dc:creator>msawyercke</dc:creator>
      <dc:date>2016-10-03T20:54:31Z</dc:date>
    </item>
    <item>
      <title>Re: Expression to use for 'Comparable' Locations</title>
      <link>https://community.qlik.com/t5/App-Development/Expression-to-use-for-Comparable-Locations/m-p/1199264#M22672</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try this:&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: 13px;"&gt;&lt;STRONG&gt;&lt;SPAN style="color: #ff0000;"&gt;Sum&lt;/SPAN&gt;({&amp;lt;[Comp_Flag] = {1}&amp;gt;} [CY TP 13])/&lt;SPAN style="color: #ff0000;"&gt;Sum&lt;/SPAN&gt;([PY TP 13]) - 1&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 03 Oct 2016 21:00:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Expression-to-use-for-Comparable-Locations/m-p/1199264#M22672</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-10-03T21:00:22Z</dc:date>
    </item>
    <item>
      <title>Re: Expression to use for 'Comparable' Locations</title>
      <link>https://community.qlik.com/t5/App-Development/Expression-to-use-for-Comparable-Locations/m-p/1199265#M22673</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Outstanding!!&amp;nbsp; Thank You, Sunny!!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 03 Oct 2016 21:04:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Expression-to-use-for-Comparable-Locations/m-p/1199265#M22673</guid>
      <dc:creator>msawyercke</dc:creator>
      <dc:date>2016-10-03T21:04:13Z</dc:date>
    </item>
  </channel>
</rss>

