<?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: Counting changes to field values by dimension compared to last month in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Counting-changes-to-field-values-by-dimension-compared-to-last/m-p/1664490#M449071</link>
    <description>&lt;P&gt;Thanks Arthur, it's very close, but what I would want to show is the 1 against the old department (B&amp;amp;B) in Jan 2020 rather than against the new one (O&amp;amp;S). The idea is that the manager of B&amp;amp;B will know how many employees moved to another department.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best wishes.&lt;/P&gt;</description>
    <pubDate>Fri, 10 Jan 2020 14:58:36 GMT</pubDate>
    <dc:creator>zakpullen</dc:creator>
    <dc:date>2020-01-10T14:58:36Z</dc:date>
    <item>
      <title>Counting changes to field values by dimension compared to last month</title>
      <link>https://community.qlik.com/t5/QlikView/Counting-changes-to-field-values-by-dimension-compared-to-last/m-p/1664037#M449028</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I have a table that lists about 5000 employees for each month. This means the list changes monthly, as employees join or leave. What I want to do though, is be able to count employees that change departments. In the example below, I want the manager of Bits &amp;amp; Bobs to be able to see in a straight table (probably) that 1 employee left their department last month. The manager will have January 2020 selected.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="tbl2.JPG" style="width: 308px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/26593iB934317A146824FE/image-size/large?v=v2&amp;amp;px=999" role="button" title="tbl2.JPG" alt="tbl2.JPG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;I don't know if there is an efficient way to do this in the front end,&amp;nbsp; I was thinking of something in the load script.&lt;/P&gt;&lt;P&gt;Any ideas welcome.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Many thanks.&lt;/P&gt;</description>
      <pubDate>Sat, 16 Nov 2024 19:20:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Counting-changes-to-field-values-by-dimension-compared-to-last/m-p/1664037#M449028</guid>
      <dc:creator>zakpullen</dc:creator>
      <dc:date>2024-11-16T19:20:13Z</dc:date>
    </item>
    <item>
      <title>Re: Counting changes to field values by dimension compared to last month</title>
      <link>https://community.qlik.com/t5/QlikView/Counting-changes-to-field-values-by-dimension-compared-to-last/m-p/1664294#M449040</link>
      <description>&lt;P&gt;Try this:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="MC.PNG" style="width: 263px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/26650i78D0DCB1A65956B9/image-size/large?v=v2&amp;amp;px=999" role="button" title="MC.PNG" alt="MC.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Script:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Raw:
load * inline[
MonthYear,EmployeeID,Department
Dec-19,12345,B&amp;amp;B
Dec-19,22345,B&amp;amp;B
Dec-19,34567,B&amp;amp;B
Dec-19,45678,O&amp;amp;S
Dec-19,56789,O&amp;amp;S
Jan-20,22345,B&amp;amp;B
Jan-20,12345,B&amp;amp;B
Jan-20,34567,O&amp;amp;S
Jan-20,45678,O&amp;amp;S
Jan-20,56789,O&amp;amp;S
];

NoConcatenate
Data:
load Date#(MonthYear,'MMM-YY')as MonthYear,EmployeeID,Department
RESIDENT Raw
order by EmployeeID asc,
		MonthYear asc;
		
drop table Raw;

Data2:
load *,if(peek(EmployeeID)=EmployeeID and Department&amp;lt;&amp;gt;peek(Department),1,0)as CountLeft
resident Data
order by EmployeeID asc,
		MonthYear asc;


drop table Data;
exit script;&lt;/LI-CODE&gt;</description>
      <pubDate>Fri, 10 Jan 2020 03:39:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Counting-changes-to-field-values-by-dimension-compared-to-last/m-p/1664294#M449040</guid>
      <dc:creator>Arthur_Fong</dc:creator>
      <dc:date>2020-01-10T03:39:29Z</dc:date>
    </item>
    <item>
      <title>Re: Counting changes to field values by dimension compared to last month</title>
      <link>https://community.qlik.com/t5/QlikView/Counting-changes-to-field-values-by-dimension-compared-to-last/m-p/1664490#M449071</link>
      <description>&lt;P&gt;Thanks Arthur, it's very close, but what I would want to show is the 1 against the old department (B&amp;amp;B) in Jan 2020 rather than against the new one (O&amp;amp;S). The idea is that the manager of B&amp;amp;B will know how many employees moved to another department.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best wishes.&lt;/P&gt;</description>
      <pubDate>Fri, 10 Jan 2020 14:58:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Counting-changes-to-field-values-by-dimension-compared-to-last/m-p/1664490#M449071</guid>
      <dc:creator>zakpullen</dc:creator>
      <dc:date>2020-01-10T14:58:36Z</dc:date>
    </item>
    <item>
      <title>Re: Counting changes to field values by dimension compared to last month</title>
      <link>https://community.qlik.com/t5/QlikView/Counting-changes-to-field-values-by-dimension-compared-to-last/m-p/1664520#M449073</link>
      <description>&lt;LI-CODE lang="javascript"&gt;Data:
Load *,
     date(Date#(MonthYear,'MMM-YY'),'MMM-YY') as YearMonth;
load * inline [
MonthYear,EmployeeID,Department
Dec-19,12345,B&amp;amp;B
Dec-19,22345,B&amp;amp;B
Dec-19,34567,B&amp;amp;B
Dec-19,45678,O&amp;amp;S
Dec-19,56789,O&amp;amp;S
Jan-20,22345,B&amp;amp;B
Jan-20,12345,B&amp;amp;B
Jan-20,34567,O&amp;amp;S
Jan-20,45678,O&amp;amp;S
Jan-20,56789,O&amp;amp;S
Jan-21,34567,S&amp;amp;S
];

drop field MonthYear;

Final:
Load *,
     if(EmployeeID=Previous(EmployeeID) and Department&amp;lt;&amp;gt;Previous(Department), 1,0) as EmployeeFlag
Resident Data
Order by EmployeeID,YearMonth desc;

Drop Table Data;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Now you can create a report with Dimension&amp;nbsp; &lt;STRONG&gt;YearMonth&amp;nbsp;&lt;/STRONG&gt;and expression as below&lt;/P&gt;&lt;P&gt;=count({&amp;lt;EmployeeFlag={1}&amp;gt;} distinct EmployeeID)&lt;/P&gt;</description>
      <pubDate>Fri, 10 Jan 2020 15:39:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Counting-changes-to-field-values-by-dimension-compared-to-last/m-p/1664520#M449073</guid>
      <dc:creator>Kushal_Chawda</dc:creator>
      <dc:date>2020-01-10T15:39:16Z</dc:date>
    </item>
    <item>
      <title>Re: Counting changes to field values by dimension compared to last month</title>
      <link>https://community.qlik.com/t5/QlikView/Counting-changes-to-field-values-by-dimension-compared-to-last/m-p/1674125#M449603</link>
      <description>&lt;P&gt;Zak, did any of the other posts get you what you needed?&amp;nbsp; If so, please be sure you return to the thread and use the Accept as Solution button on that post to give them credit for the assistance and to let other Members know what worked.&amp;nbsp; If you are still working on things, please leave an update, and if you did something else, please consider posting that and then mark that as the solution.&lt;/P&gt;
&lt;P&gt;I do have a Design Blog post that I think may be helpful on this one too in addition to the other posts:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://community.qlik.com/t5/Qlik-Design-Blog/Slowly-Changing-Dimensions/ba-p/1464187" target="_blank"&gt;https://community.qlik.com/t5/Qlik-Design-Blog/Slowly-Changing-Dimensions/ba-p/1464187&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;Regards,&lt;BR /&gt;Brett&lt;/P&gt;</description>
      <pubDate>Mon, 10 Feb 2020 20:38:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Counting-changes-to-field-values-by-dimension-compared-to-last/m-p/1674125#M449603</guid>
      <dc:creator>Brett_Bleess</dc:creator>
      <dc:date>2020-02-10T20:38:53Z</dc:date>
    </item>
  </channel>
</rss>

