<?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 calculate switched cases in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/calculate-switched-cases/m-p/1680110#M726995</link>
    <description>&lt;P&gt;&lt;SPAN&gt;I have to intercept (and calculate) the change of drugs distributed (AP_MINSAN10) between two delivery dates&amp;nbsp;(FA_DATA_EROG) per patient (c.d. SWITCHED PATIENTS)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;In the example attached the&amp;nbsp;&lt;/P&gt;&lt;P&gt;PROVA PAZIENTE1 have n.2 switch&lt;/P&gt;&lt;P&gt;PROVA PAZIENTE2 have n.3 switch&lt;/P&gt;&lt;P&gt;PROVA PAZIENTE3 have n.1 switch&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Can you give me the correct expression for count these occurences?&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 25 Nov 2020 16:16:04 GMT</pubDate>
    <dc:creator>gabroteddy</dc:creator>
    <dc:date>2020-11-25T16:16:04Z</dc:date>
    <item>
      <title>calculate switched cases</title>
      <link>https://community.qlik.com/t5/QlikView/calculate-switched-cases/m-p/1680110#M726995</link>
      <description>&lt;P&gt;&lt;SPAN&gt;I have to intercept (and calculate) the change of drugs distributed (AP_MINSAN10) between two delivery dates&amp;nbsp;(FA_DATA_EROG) per patient (c.d. SWITCHED PATIENTS)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;In the example attached the&amp;nbsp;&lt;/P&gt;&lt;P&gt;PROVA PAZIENTE1 have n.2 switch&lt;/P&gt;&lt;P&gt;PROVA PAZIENTE2 have n.3 switch&lt;/P&gt;&lt;P&gt;PROVA PAZIENTE3 have n.1 switch&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Can you give me the correct expression for count these occurences?&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 25 Nov 2020 16:16:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/calculate-switched-cases/m-p/1680110#M726995</guid>
      <dc:creator>gabroteddy</dc:creator>
      <dc:date>2020-11-25T16:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: calculate switched cases</title>
      <link>https://community.qlik.com/t5/QlikView/calculate-switched-cases/m-p/1680148#M726996</link>
      <description>&lt;P&gt;Will this work?&lt;/P&gt;</description>
      <pubDate>Fri, 28 Feb 2020 04:18:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/calculate-switched-cases/m-p/1680148#M726996</guid>
      <dc:creator>alex00321</dc:creator>
      <dc:date>2020-02-28T04:18:58Z</dc:date>
    </item>
    <item>
      <title>Re: calculate switched cases</title>
      <link>https://community.qlik.com/t5/QlikView/calculate-switched-cases/m-p/1680190#M726997</link>
      <description>&lt;P&gt;Thank you Alex but not work.&lt;/P&gt;&lt;P&gt;I must consider both information THERAPY (APMINSAN) and&amp;nbsp;&lt;SPAN&gt;delivery dates&amp;nbsp;(FA_DATA_EROG) to calculate siwtches.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;the expression that you propose&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Count(DISTINCT FA_DATA_EROG)-1&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;consider only the delivery date.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;The expression&amp;nbsp;does not have to calculate the switch if a patient continue the same therapy on two or more delivery dates (FA_DATA_EROG) following one another &amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Can you help me?&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 28 Feb 2020 07:44:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/calculate-switched-cases/m-p/1680190#M726997</guid>
      <dc:creator>gabroteddy</dc:creator>
      <dc:date>2020-02-28T07:44:17Z</dc:date>
    </item>
    <item>
      <title>Re: calculate switched cases</title>
      <link>https://community.qlik.com/t5/QlikView/calculate-switched-cases/m-p/1680624#M726998</link>
      <description>&lt;P&gt;Try use this:&lt;/P&gt;&lt;P&gt;count(Aggr(Count(distinct AP_MINSAN10),PAZIENTE,FA_DATA_EROG))-1&lt;/P&gt;&lt;P&gt;to see if it works. Thanks!&lt;/P&gt;</description>
      <pubDate>Sat, 29 Feb 2020 12:02:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/calculate-switched-cases/m-p/1680624#M726998</guid>
      <dc:creator>alex00321</dc:creator>
      <dc:date>2020-02-29T12:02:26Z</dc:date>
    </item>
    <item>
      <title>Re: calculate switched cases</title>
      <link>https://community.qlik.com/t5/QlikView/calculate-switched-cases/m-p/1680629#M726999</link>
      <description>&lt;P&gt;No, not works....&lt;span class="lia-unicode-emoji" title=":loudly_crying_face:"&gt;😭&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Other ideas?&lt;/P&gt;</description>
      <pubDate>Sat, 29 Feb 2020 14:35:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/calculate-switched-cases/m-p/1680629#M726999</guid>
      <dc:creator>gabroteddy</dc:creator>
      <dc:date>2020-02-29T14:35:25Z</dc:date>
    </item>
    <item>
      <title>Re: calculate switched cases</title>
      <link>https://community.qlik.com/t5/QlikView/calculate-switched-cases/m-p/1680705#M727000</link>
      <description>&lt;P&gt;Hi, can you check attached file, seems working for me?&lt;/P&gt;</description>
      <pubDate>Mon, 02 Mar 2020 01:57:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/calculate-switched-cases/m-p/1680705#M727000</guid>
      <dc:creator>alex00321</dc:creator>
      <dc:date>2020-03-02T01:57:57Z</dc:date>
    </item>
    <item>
      <title>Re: calculate switched cases</title>
      <link>https://community.qlik.com/t5/QlikView/calculate-switched-cases/m-p/1681256#M727001</link>
      <description>&lt;P&gt;No alex,&lt;/P&gt;&lt;P&gt;the result of your expression is correct but only for the data of the provided excel table, since the data grow and change over time in my database, the result of&amp;nbsp; your expression does not give me the expected result.&lt;/P&gt;&lt;P&gt;Have you any other idea?&lt;/P&gt;</description>
      <pubDate>Tue, 03 Mar 2020 11:44:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/calculate-switched-cases/m-p/1681256#M727001</guid>
      <dc:creator>gabroteddy</dc:creator>
      <dc:date>2020-03-03T11:44:44Z</dc:date>
    </item>
    <item>
      <title>Re: calculate switched cases</title>
      <link>https://community.qlik.com/t5/QlikView/calculate-switched-cases/m-p/1681541#M727002</link>
      <description>&lt;P&gt;Hi can you give some data on where you see the unexpected result?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 04 Mar 2020 02:15:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/calculate-switched-cases/m-p/1681541#M727002</guid>
      <dc:creator>alex00321</dc:creator>
      <dc:date>2020-03-04T02:15:48Z</dc:date>
    </item>
  </channel>
</rss>

