<?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: Personell fluctuation week_over_week in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Personell-fluctuation-week-over-week/m-p/478734#M550931</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;BR /&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I realized that the field &amp;gt;Woche&amp;lt; which I use as dimension is a numeric field anyway - so I can simply calculate (Woche - 1) - but that doesn't work either.&lt;/P&gt;&lt;P&gt;I'm really stuck on this one.&lt;/P&gt;&lt;P&gt;Can anybody help me here?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks a lot!&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DataNibbler&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 22 Nov 2013 12:41:10 GMT</pubDate>
    <dc:creator>datanibbler</dc:creator>
    <dc:date>2013-11-22T12:41:10Z</dc:date>
    <item>
      <title>Personell fluctuation week_over_week</title>
      <link>https://community.qlik.com/t5/QlikView/Personell-fluctuation-week-over-week/m-p/478732#M550929</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 chart showing personell_fluctuation per week:&lt;/P&gt;&lt;P&gt;It calculates as&lt;/P&gt;&lt;P&gt;"nr_of_employees_who_left_in_given_week / nr_of_employees_total_in_week_before".&lt;/P&gt;&lt;P&gt;The expression I currently use to calculate the second part is&lt;/P&gt;&lt;P&gt;&amp;gt;&amp;gt;&amp;gt; COUNT&lt;SPAN style="font-size: 8pt;"&gt;({$&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Woche&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; = {&lt;/SPAN&gt;&lt;STRONG&gt;&lt;EM style=": ; color: #808080; font-size: 8pt;"&gt;$(=WEEK(min(%Datum) - 1))&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt;}&amp;gt;} &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;DISTINCT&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Pers_Nr_g&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;) &amp;lt;&amp;lt;&amp;lt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;That works as such - but strangely, when I select 2013 and Nov, then I see five weeks - 44, 45, 46, 47, 48 - but that figure is displayed only for week 44.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;Can somebody help me there, please?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;Thanks a lot!&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;Best regards,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;DataNibbler&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 22 Nov 2013 10:59:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Personell-fluctuation-week-over-week/m-p/478732#M550929</guid>
      <dc:creator>datanibbler</dc:creator>
      <dc:date>2013-11-22T10:59:16Z</dc:date>
    </item>
    <item>
      <title>Re: Personell fluctuation week_over_week</title>
      <link>https://community.qlik.com/t5/QlikView/Personell-fluctuation-week-over-week/m-p/478733#M550930</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ah - yes, I see - there's only one &amp;gt;&amp;gt;&amp;gt; min(%Datum) &amp;lt;&amp;lt;&amp;lt; when no specific week is selected...&lt;/P&gt;&lt;P&gt;How to do that, then?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 22 Nov 2013 11:17:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Personell-fluctuation-week-over-week/m-p/478733#M550930</guid>
      <dc:creator>datanibbler</dc:creator>
      <dc:date>2013-11-22T11:17:07Z</dc:date>
    </item>
    <item>
      <title>Re: Personell fluctuation week_over_week</title>
      <link>https://community.qlik.com/t5/QlikView/Personell-fluctuation-week-over-week/m-p/478734#M550931</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;BR /&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I realized that the field &amp;gt;Woche&amp;lt; which I use as dimension is a numeric field anyway - so I can simply calculate (Woche - 1) - but that doesn't work either.&lt;/P&gt;&lt;P&gt;I'm really stuck on this one.&lt;/P&gt;&lt;P&gt;Can anybody help me here?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks a lot!&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DataNibbler&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 22 Nov 2013 12:41:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Personell-fluctuation-week-over-week/m-p/478734#M550931</guid>
      <dc:creator>datanibbler</dc:creator>
      <dc:date>2013-11-22T12:41:10Z</dc:date>
    </item>
    <item>
      <title>Re: Personell fluctuation week_over_week</title>
      <link>https://community.qlik.com/t5/QlikView/Personell-fluctuation-week-over-week/m-p/478735#M550932</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What I don't get about this is, above all:&lt;/P&gt;&lt;P&gt;It works FINE in a straight_table_diagram - I can have&lt;/P&gt;&lt;P&gt;- My_week as dimension&lt;/P&gt;&lt;P&gt;- COUNT&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;DISTINCT&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Pers_Nr5&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;) &lt;/SPAN&gt; as expression for the current week's value&lt;/P&gt;&lt;P&gt;- (min(%Datum)-5) as expression for a date in the past week&lt;/P&gt;&lt;P&gt;- week(min(%Datum)-5) as expression for the past week&lt;/P&gt;&lt;P&gt;&amp;lt;=&amp;gt; The expression I use for last week's value&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;COUNT&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;({$&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Woche&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; = {&lt;/SPAN&gt;&lt;STRONG&gt;&lt;EM style=": ; color: #808080; font-size: 8pt;"&gt;$(=week(min(%Datum)-5))&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt;}&amp;gt;} &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;DISTINCT&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Pers_Nr5&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;) &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;does not work. I get only 0s.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;Can anybody help me here?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;min&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;%Datum&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;)-5) &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 22 Nov 2013 14:43:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Personell-fluctuation-week-over-week/m-p/478735#M550932</guid>
      <dc:creator>datanibbler</dc:creator>
      <dc:date>2013-11-22T14:43:46Z</dc:date>
    </item>
    <item>
      <title>Re: Personell fluctuation week_over_week</title>
      <link>https://community.qlik.com/t5/QlikView/Personell-fluctuation-week-over-week/m-p/478736#M550933</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;With set analysis the set is calculated once for the entire chart. So you can't use it to calculate rolling expressions.&lt;/P&gt;&lt;P&gt;Try inter-record functions instead as above/before.&lt;/P&gt;&lt;P&gt;Or make additional calculations in script.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 22 Nov 2013 22:18:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Personell-fluctuation-week-over-week/m-p/478736#M550933</guid>
      <dc:creator>whiteline</dc:creator>
      <dc:date>2013-11-22T22:18:28Z</dc:date>
    </item>
    <item>
      <title>Re: Personell fluctuation week_over_week</title>
      <link>https://community.qlik.com/t5/QlikView/Personell-fluctuation-week-over-week/m-p/478737#M550934</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;BR /&gt;Hi whiteline,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks a lot! I thought of that in the meantime - and I tried using the aggr() function.&lt;/P&gt;&lt;P&gt;I haven't made it yet, but it seems I can use that function to get there.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DataNibbler&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 Nov 2013 08:09:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Personell-fluctuation-week-over-week/m-p/478737#M550934</guid>
      <dc:creator>datanibbler</dc:creator>
      <dc:date>2013-11-25T08:09:36Z</dc:date>
    </item>
    <item>
      <title>Re: Personell fluctuation week_over_week</title>
      <link>https://community.qlik.com/t5/QlikView/Personell-fluctuation-week-over-week/m-p/478738#M550935</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 guess it has to be more complicated still. One aggr() fct does not seem to be enough to make it in the diagram - I can have the nr_of_the_past_week displayed for every week using aggr()&lt;/P&gt;&lt;P&gt;&amp;lt;=&amp;gt; I need the COUNT_of_employees_in_the_past_week, so for all I know I would need SET_analysis - but I cannot see how I could do that.&lt;/P&gt;&lt;P&gt;I will try creating the aggregated COUNT per week in the script instead so that the diagram can use it as a native field.&lt;/P&gt;&lt;P&gt;Any help with this would be appreciated.&lt;/P&gt;&lt;P&gt;My base formula (for "this week's count") is&lt;/P&gt;&lt;P&gt;&amp;gt;&amp;gt;&amp;gt; &lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;aggr&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;COUNT&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;({$&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;%Datum&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; = {&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;"$(= '&amp;lt;' &amp;amp; DATE(v_today))"&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;}&amp;gt;}&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;DISTINCT&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Pers_Nr5&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;), &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Woche&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;)&amp;nbsp; &amp;lt;&amp;lt;&amp;lt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;That seems to be too complicated, though.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;Thanks a lot!&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;Best regards,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;DataNibbler&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12pt;"&gt;P.S.: OK, I think I know how - it's just going to take a while: I need a LOOP in the script through all 53 weeks of the year. The remaining difficulty is this:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12pt;"&gt;- Just counting the employees would, of course, be no good as we have one record per emplwouloyee per day in that table - everyone would be counted 7 times...&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12pt;"&gt;- Counting with a DISTINCT would not work either as the same emps (= same IDs) work for us every day - but of course the nr. fluctuates.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12pt;"&gt;- In other scenarios, I have, on the GUI, used the expression &amp;gt;&amp;gt;&amp;gt; Pers_Nr&amp;amp;Wochentag &amp;lt;&amp;lt;&amp;lt; - but I cannot use that since the field "Wochentag" is in another table, the master_calendar.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12pt;"&gt;=&amp;gt; I would need to manually build that field in that table, then I can again concatenate the Pers_ID and the day_of_week and divide that by 7 and I'll have an avg nr.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12pt;"&gt;=&amp;gt; Can I do that simpler in some way?&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 Nov 2013 08:34:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Personell-fluctuation-week-over-week/m-p/478738#M550935</guid>
      <dc:creator>datanibbler</dc:creator>
      <dc:date>2013-11-25T08:34:40Z</dc:date>
    </item>
    <item>
      <title>Re: Personell fluctuation week_over_week</title>
      <link>https://community.qlik.com/t5/QlikView/Personell-fluctuation-week-over-week/m-p/478739#M550936</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 have two kinds of facts in this case both connected with Calendar (week).&lt;/P&gt;&lt;P&gt;First one is the number of employees that works in a given week. &amp;lt;&amp;lt; closing entry&lt;/P&gt;&lt;P&gt;Second is the number of employees that left. &amp;lt;&amp;lt; turnover&lt;/P&gt;&lt;P&gt;Suppose that you have one record for each employee to be able to link some attributes (position, purpose, department)&lt;/P&gt;&lt;P&gt;You can easily connect them with a shift, especially if the above mentioned report is the only requirement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Although, you can be restricted in making changes of your data model. Though you'd better post it here, so that we can find a proper solution. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Nov 2013 21:00:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Personell-fluctuation-week-over-week/m-p/478739#M550936</guid>
      <dc:creator>whiteline</dc:creator>
      <dc:date>2013-11-26T21:00:41Z</dc:date>
    </item>
  </channel>
</rss>

