<?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 MOM count based on change in another column in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/MOM-count-based-on-change-in-another-column/m-p/1556861#M62903</link>
    <description>&lt;P&gt;So, I have gym user data and the dates when the user came in and which trainer took care of the user. There are 4 Trainer groups I have created,&lt;/P&gt;&lt;P&gt;My Data has say 6 Columns:&lt;/P&gt;&lt;P&gt;User - User who used the gym on a date&lt;BR /&gt;Gym_Trainer - Gym trainer who helped the user&lt;BR /&gt;Trainer_Group - The group to which the trainer is associated with. The trainer can switch the groups.(thats making it difficult for me)&lt;BR /&gt;User_Acct_No - Account number of the user&lt;BR /&gt;City - City of the user&lt;BR /&gt;Date - Date of service for the user&lt;/P&gt;&lt;P&gt;The Trainer_Group: There are 4 possible values for this field&lt;BR /&gt;Redcross&lt;BR /&gt;PlanetFitness&lt;BR /&gt;Golds&lt;BR /&gt;Unknown Company&lt;/P&gt;&lt;P&gt;My data in csv format:&lt;/P&gt;&lt;P&gt;User ; Gym_Trainer ; Trainer_Group ; User_Acct_No ; City ; Date&lt;BR /&gt;1 ; Raj ; Redcross ; PS0054133301 ; Taunton ; 3/2/2018&lt;BR /&gt;2 ; Raj ; Redcross ; GS0054133302 ; Taunton ; 3/4/2018&lt;BR /&gt;3 ; Raj ; Redcross ; GS0054133303 ; Taunton ; 3/1/2018&lt;BR /&gt;4 ; Raj ; Redcross ; GS0054133304 ; Taunton ; 3/1/2018&lt;BR /&gt;5 ; Raj ; Redcross ; GS0054133305 ; Taunton ; 3/1/2018&lt;BR /&gt;6 ; Raj ; Redcross ; GS0054133306 ; Taunton ; 3/1/2018&lt;BR /&gt;7 ; Raj ; Redcross ; TF0054133307 ; Middleboro ; 3/2/2018&lt;BR /&gt;8 ; Raj ; Redcross ; GS0054133308 ; Taunton ; 3/2/2018&lt;BR /&gt;9 ; Raj ; Redcross ; GS0054133309 ; Taunton ; 3/3/2018&lt;BR /&gt;10 ; Raj ; Redcross ; GS0054133310 ; Taunton ; 3/3/2018&lt;BR /&gt;11 ; Raj ; Redcross ; GS0054133311 ; Raynham ; 3/4/2018&lt;BR /&gt;12 ; Raj ; Redcross ; GS0054133312 ; Taunton ; 3/4/2018&lt;BR /&gt;13 ; Raj ; Redcross ; GS0054133313 ; Taunton ; 3/2/2019&lt;BR /&gt;14 ; Raj ; Redcross ; GS0054133314 ; Fall river ; 3/2/2019&lt;BR /&gt;15 ; Raj ; PlanetFitness ; GS0054133315 ; East taunton ; 3/3/2019&lt;BR /&gt;16 ; Raj ; PlanetFitness ; GS0054133316 ; Taunton ; 3/3/2019&lt;BR /&gt;17 ; John ; Golds ; GS0054133317 ; Taunton ; 3/4/2019&lt;BR /&gt;18 ; John ; Golds ; RG0054133318 ; Taunton ; 3/5/2019&lt;BR /&gt;19 ; John ; Golds ; GS0054133319 ; Taunton ; 3/6/2019&lt;BR /&gt;20 ; John ; Golds ; GS0054133320 ; Taunton ; 3/7/2019&lt;BR /&gt;21 ; John ; Golds ; GS0054133321 ; Taunton ; 3/8/2019&lt;BR /&gt;22 ; John ; Golds ; GS0054133322 ; Taunton ; 3/9/2019&lt;BR /&gt;23 ; John ; Golds ; GS0054133323 ; Middleboro ; 3/10/2019&lt;BR /&gt;24 ; John ; Golds ; GS0054133324 ; Taunton ; 3/11/2019&lt;BR /&gt;25 ; John ; Golds ; GS0054133325 ; Taunton ; 3/12/2019&lt;BR /&gt;26 ; Rita ; Unknown Company ; GS0054133326 ; Taunton ; 3/4/2018&lt;BR /&gt;27 ; Rita ; Unknown Company ; GS0054133327 ; Raynham ; 3/5/2018&lt;BR /&gt;28 ; Rita ; Unknown Company ; GS0054133328 ; Taunton ; 3/1/2019&lt;BR /&gt;29 ; Rita ; Unknown Company ; GS0054133329 ; Taunton ; 3/2/2019&lt;BR /&gt;30 ; Rita ; Unknown Company ; GS0054133330 ; Fall river ; 3/2/2019&lt;BR /&gt;31 ; Rita ; Unknown Company ; GS0054133331 ; East taunton ; 3/3/2019&lt;BR /&gt;32 ; Rita ; Unknown Company ; GS0054133332 ; Taunton ; 3/3/2019&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Whenever I do MOM user volume analysis (Last years MTD - This years MTD) by each group I am using the formula for measure with the dimension of Trainer_Group-&lt;/P&gt;&lt;P&gt;Count({&amp;lt;ExcludeFutDates = {'1'}&amp;gt;}distinct User_Acct_No)&lt;BR /&gt;-&lt;BR /&gt;Count({&amp;lt;Date={"&amp;gt;=$(=date(monthstart(addyears(max(Date),-1)))) &amp;lt;=$(=date(addyears(max(Date),-1)))"},[Day of Year] = {"&amp;lt;$(=DayNumYear)"}&amp;gt;}distinct User_Acct_No)&lt;/P&gt;&lt;P&gt;There could be duplicates for a user on same day so I am eliminating them by distinct. This works great untill I have a situation of Trainers switching the Trainer group.&lt;BR /&gt;e.g March 2019 MTD volume for Trainer group Redcross is - 2&lt;BR /&gt;March 2018 MTD volume for Trainer group Redcross is - 12&lt;BR /&gt;&lt;BR /&gt;So 2019 MTD-2018MTD=2012 = -10 which is great and when I choose my dimension as Gym_trainer instead of Gym_Group then the bar chart for Raj&lt;BR /&gt;March 2019 MTD - March 2018 MTD = 4-12 = 08 which is great too.&lt;BR /&gt;&lt;BR /&gt;My problem is I want to create a drilled dimension by Gym_Group&amp;gt;&amp;gt;Gym_Trainer anf then show the MOM change and who switched a particulat Gym_Group.&lt;BR /&gt;&lt;BR /&gt;When I drill to Gym_Trainer level for Raj for Redcross I see the&lt;BR /&gt;2019 MTD-2018 MTD= 2-12 = -10 which is fine&lt;BR /&gt;&lt;BR /&gt;Now when it is showing the data for the Gym_Group PlanetFitenss thats where the problem arise, I see the value as -&lt;BR /&gt;2019 MTD - 2018 MTD = 2 - 0(since raj has no entry/volume for 2018) = 2 My users are finding it difficult to grasp, Raj had no volume for last year for PlanetFitness but still his MOM value shows increase of +2 which is misleading. The MOM calculation should only happen if there was volume last year&lt;BR /&gt;for Raj in Trainer_Group PlanetFitness.&lt;BR /&gt;&lt;BR /&gt;I have tried so many things here, but no anvail &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt; I tried P function and intersection but its not working. I don't want to exclude 0 from last years value calculation since it might rliminate legitimate records.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;I have 2 problems:&lt;BR /&gt;1. For the MOM calculation(2019 MTD- 2019 MTD) how can I only include the Gym_Trainer if he/she was the part of same Trainer_Group?&lt;BR /&gt;2. If we can't exclude then a way to highlight that to my users.&lt;BR /&gt;3. Any changes I can make to load scripts to track the movement of Trainers across Trainer_Groups?&lt;/P&gt;&lt;P&gt;Please give your valuable inputs. Thanks&lt;/P&gt;&lt;P&gt;R&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 02 Apr 2021 07:51:45 GMT</pubDate>
    <dc:creator>rajeshshuklars</dc:creator>
    <dc:date>2021-04-02T07:51:45Z</dc:date>
    <item>
      <title>MOM count based on change in another column</title>
      <link>https://community.qlik.com/t5/App-Development/MOM-count-based-on-change-in-another-column/m-p/1556861#M62903</link>
      <description>&lt;P&gt;So, I have gym user data and the dates when the user came in and which trainer took care of the user. There are 4 Trainer groups I have created,&lt;/P&gt;&lt;P&gt;My Data has say 6 Columns:&lt;/P&gt;&lt;P&gt;User - User who used the gym on a date&lt;BR /&gt;Gym_Trainer - Gym trainer who helped the user&lt;BR /&gt;Trainer_Group - The group to which the trainer is associated with. The trainer can switch the groups.(thats making it difficult for me)&lt;BR /&gt;User_Acct_No - Account number of the user&lt;BR /&gt;City - City of the user&lt;BR /&gt;Date - Date of service for the user&lt;/P&gt;&lt;P&gt;The Trainer_Group: There are 4 possible values for this field&lt;BR /&gt;Redcross&lt;BR /&gt;PlanetFitness&lt;BR /&gt;Golds&lt;BR /&gt;Unknown Company&lt;/P&gt;&lt;P&gt;My data in csv format:&lt;/P&gt;&lt;P&gt;User ; Gym_Trainer ; Trainer_Group ; User_Acct_No ; City ; Date&lt;BR /&gt;1 ; Raj ; Redcross ; PS0054133301 ; Taunton ; 3/2/2018&lt;BR /&gt;2 ; Raj ; Redcross ; GS0054133302 ; Taunton ; 3/4/2018&lt;BR /&gt;3 ; Raj ; Redcross ; GS0054133303 ; Taunton ; 3/1/2018&lt;BR /&gt;4 ; Raj ; Redcross ; GS0054133304 ; Taunton ; 3/1/2018&lt;BR /&gt;5 ; Raj ; Redcross ; GS0054133305 ; Taunton ; 3/1/2018&lt;BR /&gt;6 ; Raj ; Redcross ; GS0054133306 ; Taunton ; 3/1/2018&lt;BR /&gt;7 ; Raj ; Redcross ; TF0054133307 ; Middleboro ; 3/2/2018&lt;BR /&gt;8 ; Raj ; Redcross ; GS0054133308 ; Taunton ; 3/2/2018&lt;BR /&gt;9 ; Raj ; Redcross ; GS0054133309 ; Taunton ; 3/3/2018&lt;BR /&gt;10 ; Raj ; Redcross ; GS0054133310 ; Taunton ; 3/3/2018&lt;BR /&gt;11 ; Raj ; Redcross ; GS0054133311 ; Raynham ; 3/4/2018&lt;BR /&gt;12 ; Raj ; Redcross ; GS0054133312 ; Taunton ; 3/4/2018&lt;BR /&gt;13 ; Raj ; Redcross ; GS0054133313 ; Taunton ; 3/2/2019&lt;BR /&gt;14 ; Raj ; Redcross ; GS0054133314 ; Fall river ; 3/2/2019&lt;BR /&gt;15 ; Raj ; PlanetFitness ; GS0054133315 ; East taunton ; 3/3/2019&lt;BR /&gt;16 ; Raj ; PlanetFitness ; GS0054133316 ; Taunton ; 3/3/2019&lt;BR /&gt;17 ; John ; Golds ; GS0054133317 ; Taunton ; 3/4/2019&lt;BR /&gt;18 ; John ; Golds ; RG0054133318 ; Taunton ; 3/5/2019&lt;BR /&gt;19 ; John ; Golds ; GS0054133319 ; Taunton ; 3/6/2019&lt;BR /&gt;20 ; John ; Golds ; GS0054133320 ; Taunton ; 3/7/2019&lt;BR /&gt;21 ; John ; Golds ; GS0054133321 ; Taunton ; 3/8/2019&lt;BR /&gt;22 ; John ; Golds ; GS0054133322 ; Taunton ; 3/9/2019&lt;BR /&gt;23 ; John ; Golds ; GS0054133323 ; Middleboro ; 3/10/2019&lt;BR /&gt;24 ; John ; Golds ; GS0054133324 ; Taunton ; 3/11/2019&lt;BR /&gt;25 ; John ; Golds ; GS0054133325 ; Taunton ; 3/12/2019&lt;BR /&gt;26 ; Rita ; Unknown Company ; GS0054133326 ; Taunton ; 3/4/2018&lt;BR /&gt;27 ; Rita ; Unknown Company ; GS0054133327 ; Raynham ; 3/5/2018&lt;BR /&gt;28 ; Rita ; Unknown Company ; GS0054133328 ; Taunton ; 3/1/2019&lt;BR /&gt;29 ; Rita ; Unknown Company ; GS0054133329 ; Taunton ; 3/2/2019&lt;BR /&gt;30 ; Rita ; Unknown Company ; GS0054133330 ; Fall river ; 3/2/2019&lt;BR /&gt;31 ; Rita ; Unknown Company ; GS0054133331 ; East taunton ; 3/3/2019&lt;BR /&gt;32 ; Rita ; Unknown Company ; GS0054133332 ; Taunton ; 3/3/2019&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Whenever I do MOM user volume analysis (Last years MTD - This years MTD) by each group I am using the formula for measure with the dimension of Trainer_Group-&lt;/P&gt;&lt;P&gt;Count({&amp;lt;ExcludeFutDates = {'1'}&amp;gt;}distinct User_Acct_No)&lt;BR /&gt;-&lt;BR /&gt;Count({&amp;lt;Date={"&amp;gt;=$(=date(monthstart(addyears(max(Date),-1)))) &amp;lt;=$(=date(addyears(max(Date),-1)))"},[Day of Year] = {"&amp;lt;$(=DayNumYear)"}&amp;gt;}distinct User_Acct_No)&lt;/P&gt;&lt;P&gt;There could be duplicates for a user on same day so I am eliminating them by distinct. This works great untill I have a situation of Trainers switching the Trainer group.&lt;BR /&gt;e.g March 2019 MTD volume for Trainer group Redcross is - 2&lt;BR /&gt;March 2018 MTD volume for Trainer group Redcross is - 12&lt;BR /&gt;&lt;BR /&gt;So 2019 MTD-2018MTD=2012 = -10 which is great and when I choose my dimension as Gym_trainer instead of Gym_Group then the bar chart for Raj&lt;BR /&gt;March 2019 MTD - March 2018 MTD = 4-12 = 08 which is great too.&lt;BR /&gt;&lt;BR /&gt;My problem is I want to create a drilled dimension by Gym_Group&amp;gt;&amp;gt;Gym_Trainer anf then show the MOM change and who switched a particulat Gym_Group.&lt;BR /&gt;&lt;BR /&gt;When I drill to Gym_Trainer level for Raj for Redcross I see the&lt;BR /&gt;2019 MTD-2018 MTD= 2-12 = -10 which is fine&lt;BR /&gt;&lt;BR /&gt;Now when it is showing the data for the Gym_Group PlanetFitenss thats where the problem arise, I see the value as -&lt;BR /&gt;2019 MTD - 2018 MTD = 2 - 0(since raj has no entry/volume for 2018) = 2 My users are finding it difficult to grasp, Raj had no volume for last year for PlanetFitness but still his MOM value shows increase of +2 which is misleading. The MOM calculation should only happen if there was volume last year&lt;BR /&gt;for Raj in Trainer_Group PlanetFitness.&lt;BR /&gt;&lt;BR /&gt;I have tried so many things here, but no anvail &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt; I tried P function and intersection but its not working. I don't want to exclude 0 from last years value calculation since it might rliminate legitimate records.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;I have 2 problems:&lt;BR /&gt;1. For the MOM calculation(2019 MTD- 2019 MTD) how can I only include the Gym_Trainer if he/she was the part of same Trainer_Group?&lt;BR /&gt;2. If we can't exclude then a way to highlight that to my users.&lt;BR /&gt;3. Any changes I can make to load scripts to track the movement of Trainers across Trainer_Groups?&lt;/P&gt;&lt;P&gt;Please give your valuable inputs. Thanks&lt;/P&gt;&lt;P&gt;R&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 02 Apr 2021 07:51:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/MOM-count-based-on-change-in-another-column/m-p/1556861#M62903</guid>
      <dc:creator>rajeshshuklars</dc:creator>
      <dc:date>2021-04-02T07:51:45Z</dc:date>
    </item>
  </channel>
</rss>

