<?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: set analysis: same Medication across multiple Visits in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/set-analysis-same-Medication-across-multiple-Visits/m-p/1198356#M386253</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Did you try adding DISTINCT may be?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;STRONG&gt;=Count(&lt;SPAN style="color: #ff0000;"&gt;DISTINCT&lt;/SPAN&gt; {$&amp;lt;OmOrdID = {"=DocumentDate = AuditDate2"}&amp;gt;}OmOrdID)&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 14 Oct 2016 15:16:16 GMT</pubDate>
    <dc:creator>sunny_talwar</dc:creator>
    <dc:date>2016-10-14T15:16:16Z</dc:date>
    <item>
      <title>set analysis: same Medication across multiple Visits</title>
      <link>https://community.qlik.com/t5/QlikView/set-analysis-same-Medication-across-multiple-Visits/m-p/1198355#M386252</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;Patients take medications on an ongoing basis (even when they are at home and not in the hospital), and in our system, those medications are represented by the same Home Medication Order (OmOrdID) across multiple Visits (VisitIDs). (See image below.)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;I need to count how often step 2 in the HomeMedication process &lt;SPAN style="font-size: 13.3333px;"&gt;(AuditDate2) &lt;/SPAN&gt;happens on the same date that a particular Document is Dated (DocumentDate). I need to count this for the individual providers that dictated &lt;SPAN style="font-size: 13.3333px;"&gt;(Dictator_ID) &lt;/SPAN&gt;the Documents and I also want to look at all the providers (Dictator_ID's) that are in the same group (GroupName) at once, so I can see how they compare to each other.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;I have a chart with a dimension:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;Dictator_ID.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And I have this expression:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;=Count ({$&amp;lt;OmOrdID = {"=DocumentDate = AuditDate2"}&amp;gt;}OmOrdID)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When I select, for example, Dr. Jane, the result is 46. But when I select Dr. Jane's GroupName (Hospitalists), the result for this expression in Dr. Jane's row is 45. This is because the patient was seen twice. Dr. Jane was the Dictator for one of the visits and Dr. Sue was the Dictator for the other visit. In both instances, &lt;SPAN style="font-size: 13.3333px;"&gt;DocumentDate = AuditDate2 is true. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But since Home Medication Orders (OmOrdID's) stay the same across multiple visits, I'm thinking it counts the OmOrdID twice (46) when only Dr. Jane is selected. But when the Group that both Dr. Jane and Dr. Sue belong to (GroupName = Hospitalists) is selected, it counts the OmOrdID once for Dr. Jane (45) and once for Dr. Sue.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So I need an expression that results in 45 no matter whether Dr. Jane is selected or Hospitalists are selected. I think that means I have to tell it to look at distinct VisitID's. But how do I do that?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance for any help you can provide!!!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="140659" alt="MedRecTablesScreenshot.PNG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/140659_MedRecTablesScreenshot.PNG" style="height: auto;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 14 Oct 2016 15:13:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/set-analysis-same-Medication-across-multiple-Visits/m-p/1198355#M386252</guid>
      <dc:creator>Margaret</dc:creator>
      <dc:date>2016-10-14T15:13:20Z</dc:date>
    </item>
    <item>
      <title>Re: set analysis: same Medication across multiple Visits</title>
      <link>https://community.qlik.com/t5/QlikView/set-analysis-same-Medication-across-multiple-Visits/m-p/1198356#M386253</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Did you try adding DISTINCT may be?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;STRONG&gt;=Count(&lt;SPAN style="color: #ff0000;"&gt;DISTINCT&lt;/SPAN&gt; {$&amp;lt;OmOrdID = {"=DocumentDate = AuditDate2"}&amp;gt;}OmOrdID)&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 14 Oct 2016 15:16:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/set-analysis-same-Medication-across-multiple-Visits/m-p/1198356#M386253</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-10-14T15:16:16Z</dc:date>
    </item>
    <item>
      <title>Re: set analysis: same Medication across multiple Visits</title>
      <link>https://community.qlik.com/t5/QlikView/set-analysis-same-Medication-across-multiple-Visits/m-p/1198357#M386254</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I did try that, and it didn't work. I think because the OmOrdID's are the same. But the VisitID's are different. So maybe if I could get that in somehow...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 14 Oct 2016 15:19:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/set-analysis-same-Medication-across-multiple-Visits/m-p/1198357#M386254</guid>
      <dc:creator>Margaret</dc:creator>
      <dc:date>2016-10-14T15:19:38Z</dc:date>
    </item>
    <item>
      <title>Re: set analysis: same Medication across multiple Visits</title>
      <link>https://community.qlik.com/t5/QlikView/set-analysis-same-Medication-across-multiple-Visits/m-p/1198358#M386255</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;How about counting the VisitID then?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;=Count(&lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: inherit; color: #ff0000;"&gt;DISTINCT&lt;/SPAN&gt; {$&amp;lt;OmOrdID = {"=DocumentDate = AuditDate2"}&amp;gt;} &lt;SPAN style="color: #ff0000; font-size: 13.3333px;"&gt;VisitID&lt;/SPAN&gt;)&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 14 Oct 2016 15:23:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/set-analysis-same-Medication-across-multiple-Visits/m-p/1198358#M386255</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-10-14T15:23:02Z</dc:date>
    </item>
    <item>
      <title>Re: set analysis: same Medication across multiple Visits</title>
      <link>https://community.qlik.com/t5/QlikView/set-analysis-same-Medication-across-multiple-Visits/m-p/1198359#M386256</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Maybe use Aggr&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;STRONG&gt;Aggr(Count(DISTINCT {$&amp;lt;OmOrdID = {"=DocumentDate = AuditDate2"}&amp;gt;}OmOrdID),Dictator_ID)&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 14 Oct 2016 15:25:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/set-analysis-same-Medication-across-multiple-Visits/m-p/1198359#M386256</guid>
      <dc:creator>rupamjyotidas</dc:creator>
      <dc:date>2016-10-14T15:25:43Z</dc:date>
    </item>
    <item>
      <title>Re: set analysis: same Medication across multiple Visits</title>
      <link>https://community.qlik.com/t5/QlikView/set-analysis-same-Medication-across-multiple-Visits/m-p/1198360#M386257</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;So that helped--it gave me consistent numbers no matter my selections. But it counts the number of visits for which the DocumentDate and AuditDate2 dates match. But there are multiple OmOrdIDs per visit. I don't know if it counting when ALL OmOrdID's have the same DocumentDate and AuditDate2? Or ANY of the OmOrdID's have the same? And they really want to know numbers by Medication, not by Visit.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 14 Oct 2016 15:33:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/set-analysis-same-Medication-across-multiple-Visits/m-p/1198360#M386257</guid>
      <dc:creator>Margaret</dc:creator>
      <dc:date>2016-10-14T15:33:57Z</dc:date>
    </item>
    <item>
      <title>Re: set analysis: same Medication across multiple Visits</title>
      <link>https://community.qlik.com/t5/QlikView/set-analysis-same-Medication-across-multiple-Visits/m-p/1198361#M386258</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am not really sure I understand your data well enough to offer much help. May be look at that &lt;A href="https://community.qlik.com/people/rupamjyotidas"&gt;rupamjyotidas&lt;/A&gt;‌ have provided &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 14 Oct 2016 15:41:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/set-analysis-same-Medication-across-multiple-Visits/m-p/1198361#M386258</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-10-14T15:41:18Z</dc:date>
    </item>
    <item>
      <title>Re: set analysis: same Medication across multiple Visits</title>
      <link>https://community.qlik.com/t5/QlikView/set-analysis-same-Medication-across-multiple-Visits/m-p/1198362#M386259</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;that gave the same results as the original expression &lt;span class="lia-unicode-emoji" title=":confused_face:"&gt;😕&lt;/span&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 14 Oct 2016 16:03:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/set-analysis-same-Medication-across-multiple-Visits/m-p/1198362#M386259</guid>
      <dc:creator>Margaret</dc:creator>
      <dc:date>2016-10-14T16:03:01Z</dc:date>
    </item>
    <item>
      <title>Re: set analysis: same Medication across multiple Visits</title>
      <link>https://community.qlik.com/t5/QlikView/set-analysis-same-Medication-across-multiple-Visits/m-p/1198363#M386260</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;To put it another way: For each distinct VisitID, how many of the AuditDate2's belonging to each OmOrdID's have the same date as the Document date.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;(The OmOrdID's have a one-to-one relationship with AuditDate2's, but only within VisitID's. For now, there is only one document for each Order ID. And as mentioned, there can be multiple OmOrdID's for each VisitID.)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 14 Oct 2016 22:46:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/set-analysis-same-Medication-across-multiple-Visits/m-p/1198363#M386260</guid>
      <dc:creator>Margaret</dc:creator>
      <dc:date>2016-10-14T22:46:51Z</dc:date>
    </item>
  </channel>
</rss>

