<?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: Chart comparing change over time for multiple dimensions - normalized at start (first value=1 for each dimension) in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Chart-comparing-change-over-time-for-multiple-dimensions/m-p/1868610#M71723</link>
    <description>&lt;P&gt;Thank you. This helped. At the end of the day I have created a bit different formula that works:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Sum(Mortality) / Sum(TOTAL &amp;lt;Wojevodeship&amp;gt; if(Week&amp;lt;20, Mortality,0))*19&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;I had some problems with {} based expressions and for some reason the&amp;nbsp;&lt;SPAN&gt;{&amp;lt; week= {"$(=vMinweek)"} &amp;gt;} did not fully work, but the above line works like a charm.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;The syntax:&lt;/SPAN&gt;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Sum(TOTAL &amp;lt;Wojevodship&amp;gt; Mortality)&lt;/LI-CODE&gt;
&lt;P&gt;&lt;SPAN&gt;is a bit misleading because I thought this is summing over all Wojevodships and not sum ignoring Wojevodships&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 09 Dec 2021 12:27:31 GMT</pubDate>
    <dc:creator>damago1</dc:creator>
    <dc:date>2021-12-09T12:27:31Z</dc:date>
    <item>
      <title>Chart comparing change over time for multiple dimensions - normalized at start (first value=1 for each dimension)</title>
      <link>https://community.qlik.com/t5/App-Development/Chart-comparing-change-over-time-for-multiple-dimensions/m-p/1867299#M71612</link>
      <description>&lt;P&gt;I would like to create a graph comparing change in mortality for each vojevodship week by week, comparing to mortality in week=1 for each vojevodship. The absolute values are different because vojevoships are of different population but what I want to see is a growth/decline from the start of plotted period. That is I want to show only relative change for each week, compared to week 1. It means all lines should start with the same place, in week=1 and then show Sum(Mortality)/Sum("Mortality in week 1 for this vojevodship")&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here is a similiar graph showing a pair of currencies over time:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Zrzut ekranu 2021-12-06 224235.jpg" style="width: 660px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/68015iDD655E9CA1DC53F6/image-size/large?v=v2&amp;amp;px=999" role="button" title="Zrzut ekranu 2021-12-06 224235.jpg" alt="Zrzut ekranu 2021-12-06 224235.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;I have data with 2 dimensions: [week] and [vojewodship]. There are other dimensions too like [year] [gender] etc but this is not relevant here.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have created a line chart. Added 2 dimensions to this chart, so I have now: Group=Week, Line=Vojewodship dimensions, and one measure: Sum(Mortality)&lt;/P&gt;
&lt;P&gt;I was trying:&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Sum(Mortality)/Top(Sum(Mortality)) but it is iterating over Vojevoships not over weeks. So it seems to be comparing to the first vojevodship in the same week and not to the first week in the same vojevodship&lt;/P&gt;
&lt;P&gt;Sum(Mortality)/First(Sum(Mortality)) but it is returning nothing. The plot is empty.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 06 Dec 2021 21:53:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Chart-comparing-change-over-time-for-multiple-dimensions/m-p/1867299#M71612</guid>
      <dc:creator>damago1</dc:creator>
      <dc:date>2021-12-06T21:53:32Z</dc:date>
    </item>
    <item>
      <title>Re: Chart comparing change over time for multiple dimensions - normalized at start (first value=1 for each dimension)</title>
      <link>https://community.qlik.com/t5/App-Development/Chart-comparing-change-over-time-for-multiple-dimensions/m-p/1867308#M71615</link>
      <description>&lt;P&gt;There's probably a cleaner way to do this, but I think using a calculated, totaled set would work:&lt;/P&gt;
&lt;P&gt;Sum(Mortality)&lt;BR /&gt;/&lt;BR /&gt;Sum(total &amp;lt;vojewodship&amp;gt; {&amp;lt; week= {"$(=vMinweek)"} &amp;gt;} Mortality)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Where vMinPeriod is a variable for the minimum week: =Min(Total &amp;lt;vojewodship&amp;gt; week) (if week is not a number, use MinString instead)&lt;/P&gt;
&lt;P&gt;Note that this will only work if the data for all vojewodship starts on the same week. If there's a gap in the first week for any of them, this will return 0 across the entire line as there will be no first value found.&lt;/P&gt;</description>
      <pubDate>Mon, 06 Dec 2021 22:22:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Chart-comparing-change-over-time-for-multiple-dimensions/m-p/1867308#M71615</guid>
      <dc:creator>Or</dc:creator>
      <dc:date>2021-12-06T22:22:09Z</dc:date>
    </item>
    <item>
      <title>Re: Chart comparing change over time for multiple dimensions - normalized at start (first value=1 for each dimension)</title>
      <link>https://community.qlik.com/t5/App-Development/Chart-comparing-change-over-time-for-multiple-dimensions/m-p/1868610#M71723</link>
      <description>&lt;P&gt;Thank you. This helped. At the end of the day I have created a bit different formula that works:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Sum(Mortality) / Sum(TOTAL &amp;lt;Wojevodeship&amp;gt; if(Week&amp;lt;20, Mortality,0))*19&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;I had some problems with {} based expressions and for some reason the&amp;nbsp;&lt;SPAN&gt;{&amp;lt; week= {"$(=vMinweek)"} &amp;gt;} did not fully work, but the above line works like a charm.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;The syntax:&lt;/SPAN&gt;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Sum(TOTAL &amp;lt;Wojevodship&amp;gt; Mortality)&lt;/LI-CODE&gt;
&lt;P&gt;&lt;SPAN&gt;is a bit misleading because I thought this is summing over all Wojevodships and not sum ignoring Wojevodships&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 09 Dec 2021 12:27:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Chart-comparing-change-over-time-for-multiple-dimensions/m-p/1868610#M71723</guid>
      <dc:creator>damago1</dc:creator>
      <dc:date>2021-12-09T12:27:31Z</dc:date>
    </item>
  </channel>
</rss>

