<?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 Patient Cohort (AND Slicer) in Quick Measures Gallery</title>
    <link>https://community.fabric.microsoft.com/t5/Quick-Measures-Gallery/Patient-Cohort-AND-Slicer/m-p/391883#M130</link>
    <description>&lt;P&gt;In the healthcare field, it is often desireable to identify a cohort of patients with similar, multiple diagnoses. This quick measure returns a comma-delimited list of patients that have all been identified with the same diagnoses. The tricky part here is that this allows the user to select from a slicer the diagnoses for which the user is interested in obtaining a cohort. Identified patients have had diagnoses that meet all of the selected criteria. In other words, all patients have had diagnoses for all of the selected diagnoses in the slicer. Essentially creates an AND for the slicer as opposed to the normal OR.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;Cohort = &lt;BR /&gt;VAR tmpTable1 = GENERATE(VALUES(Diagnosis[Patient]),&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; EXCEPT(&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; VALUES(Diagnosis[Diagnosis]),&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; CALCULATETABLE(VALUES(Diagnosis[Diagnosis]))))&lt;BR /&gt;VAR tmpTable2 = SUMMARIZE(tmpTable1,Diagnosis[Patient])&lt;BR /&gt;VAR tmpTable3 = EXCEPT(VALUES(Diagnosis[Patient]),tmpTable2)&lt;BR /&gt;RETURN CONCATENATEX(tmpTable3,[Patient],",")&lt;/PRE&gt;
&lt;P&gt;This quick measure would take two inputs, the column for the ID to return (Patient) and the column for the slicer selection (Diagnosis)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Also included is the trivial variation, Count of Cohort:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;Count of Cohort = 
VAR tmpTable1 = GENERATE(VALUES(Diagnosis[Patient]),
                         EXCEPT(
                                VALUES(Diagnosis[Diagnosis]),
                                CALCULATETABLE(VALUES(Diagnosis[Diagnosis]))))
VAR tmpTable2 = SUMMARIZE(tmpTable1,Diagnosis[Patient])
VAR tmpTable3 = EXCEPT(VALUES(Diagnosis[Patient]),tmpTable2)
RETURN COUNTROWS(tmpTable3)&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&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="reportid hidden"&gt;eyJrIjoiZWYwNzZlNzctOTc5NC00ZWU1LWI2OWMtYTZjYTI0MjIzMjEzIiwidCI6IjRhMDQyNzQzLTM3M2EtNDNkMi04MjdiLTAwM2Y0YzdiYTFlNSIsImMiOjN9&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Mon, 10 Sep 2018 13:38:18 GMT</pubDate>
    <dc:creator>Greg_Deckler</dc:creator>
    <dc:date>2018-09-10T13:38:18Z</dc:date>
    <item>
      <title>Patient Cohort (AND Slicer)</title>
      <link>https://community.fabric.microsoft.com/t5/Quick-Measures-Gallery/Patient-Cohort-AND-Slicer/m-p/391883#M130</link>
      <description>&lt;P&gt;In the healthcare field, it is often desireable to identify a cohort of patients with similar, multiple diagnoses. This quick measure returns a comma-delimited list of patients that have all been identified with the same diagnoses. The tricky part here is that this allows the user to select from a slicer the diagnoses for which the user is interested in obtaining a cohort. Identified patients have had diagnoses that meet all of the selected criteria. In other words, all patients have had diagnoses for all of the selected diagnoses in the slicer. Essentially creates an AND for the slicer as opposed to the normal OR.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;Cohort = &lt;BR /&gt;VAR tmpTable1 = GENERATE(VALUES(Diagnosis[Patient]),&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; EXCEPT(&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; VALUES(Diagnosis[Diagnosis]),&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; CALCULATETABLE(VALUES(Diagnosis[Diagnosis]))))&lt;BR /&gt;VAR tmpTable2 = SUMMARIZE(tmpTable1,Diagnosis[Patient])&lt;BR /&gt;VAR tmpTable3 = EXCEPT(VALUES(Diagnosis[Patient]),tmpTable2)&lt;BR /&gt;RETURN CONCATENATEX(tmpTable3,[Patient],",")&lt;/PRE&gt;
&lt;P&gt;This quick measure would take two inputs, the column for the ID to return (Patient) and the column for the slicer selection (Diagnosis)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Also included is the trivial variation, Count of Cohort:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;Count of Cohort = 
VAR tmpTable1 = GENERATE(VALUES(Diagnosis[Patient]),
                         EXCEPT(
                                VALUES(Diagnosis[Diagnosis]),
                                CALCULATETABLE(VALUES(Diagnosis[Diagnosis]))))
VAR tmpTable2 = SUMMARIZE(tmpTable1,Diagnosis[Patient])
VAR tmpTable3 = EXCEPT(VALUES(Diagnosis[Patient]),tmpTable2)
RETURN COUNTROWS(tmpTable3)&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&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="reportid hidden"&gt;eyJrIjoiZWYwNzZlNzctOTc5NC00ZWU1LWI2OWMtYTZjYTI0MjIzMjEzIiwidCI6IjRhMDQyNzQzLTM3M2EtNDNkMi04MjdiLTAwM2Y0YzdiYTFlNSIsImMiOjN9&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 10 Sep 2018 13:38:18 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Quick-Measures-Gallery/Patient-Cohort-AND-Slicer/m-p/391883#M130</guid>
      <dc:creator>Greg_Deckler</dc:creator>
      <dc:date>2018-09-10T13:38:18Z</dc:date>
    </item>
    <item>
      <title>Re: Patient Cohort (AND Slicer)</title>
      <link>https://community.fabric.microsoft.com/t5/Quick-Measures-Gallery/Patient-Cohort-AND-Slicer/m-p/3140939#M959</link>
      <description>&lt;P&gt;You may want to try a measure with better performance&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Measure = 
VAR __cnt = COUNTROWS( ALLSELECTED( Diagnosis[Diagnosis] ) )
RETURN
    CONCATENATEX(
        FILTER(
            VALUES( Diagnosis[Patient] ),
            CALCULATE( DISTINCTCOUNT( Diagnosis[Diagnosis] ) ) = __cnt
        ),
        Diagnosis[Patient],
        ","
    )&lt;/LI-CODE&gt;</description>
      <pubDate>Sun, 19 Mar 2023 19:40:13 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Quick-Measures-Gallery/Patient-Cohort-AND-Slicer/m-p/3140939#M959</guid>
      <dc:creator>CNENFRNL</dc:creator>
      <dc:date>2023-03-19T19:40:13Z</dc:date>
    </item>
    <item>
      <title>Re: Patient Cohort (AND Slicer)</title>
      <link>https://community.fabric.microsoft.com/t5/Quick-Measures-Gallery/Patient-Cohort-AND-Slicer/m-p/3141000#M960</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="250150" data-lia-user-login="CNENFRNL" class="lia-mention lia-mention-user"&gt;CNENFRNL&lt;/a&gt;&amp;nbsp;I'm missing something...&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 19 Mar 2023 21:19:41 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Quick-Measures-Gallery/Patient-Cohort-AND-Slicer/m-p/3141000#M960</guid>
      <dc:creator>Greg_Deckler</dc:creator>
      <dc:date>2023-03-19T21:19:41Z</dc:date>
    </item>
    <item>
      <title>Re: Patient Cohort (AND Slicer)</title>
      <link>https://community.fabric.microsoft.com/t5/Quick-Measures-Gallery/Patient-Cohort-AND-Slicer/m-p/3283855#M982</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="313" data-lia-user-login="Greg_Deckler" class="lia-mention lia-mention-user"&gt;Greg_Deckler&lt;/a&gt;&amp;nbsp;How could this be amended so that the patient was in a table format?&lt;/P&gt;</description>
      <pubDate>Wed, 14 Jun 2023 14:02:19 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Quick-Measures-Gallery/Patient-Cohort-AND-Slicer/m-p/3283855#M982</guid>
      <dc:creator>lherbert501</dc:creator>
      <dc:date>2023-06-14T14:02:19Z</dc:date>
    </item>
    <item>
      <title>Re: Patient Cohort (AND Slicer)</title>
      <link>https://community.fabric.microsoft.com/t5/Quick-Measures-Gallery/Patient-Cohort-AND-Slicer/m-p/3285967#M985</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="362350" data-lia-user-login="lherbert501" class="lia-mention lia-mention-user"&gt;lherbert501&lt;/a&gt;&amp;nbsp;Just drop the CONCATENATEX and return tmpTable3 or use the CONCATENATEX with UNICHAR(10) &amp;amp; (UNICHAR(13) as the delimeter.&lt;/P&gt;</description>
      <pubDate>Thu, 15 Jun 2023 13:00:55 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Quick-Measures-Gallery/Patient-Cohort-AND-Slicer/m-p/3285967#M985</guid>
      <dc:creator>Greg_Deckler</dc:creator>
      <dc:date>2023-06-15T13:00:55Z</dc:date>
    </item>
    <item>
      <title>Re: Patient Cohort (AND Slicer)</title>
      <link>https://community.fabric.microsoft.com/t5/Quick-Measures-Gallery/Patient-Cohort-AND-Slicer/m-p/3826495#M1076</link>
      <description>&lt;P&gt;Thank you for directing me to this&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="313" data-lia-user-login="Greg_Deckler" class="lia-mention lia-mention-user"&gt;Greg_Deckler&lt;/a&gt;&amp;nbsp;, it's a very elegant solution.&lt;BR /&gt;Picking up on the question from&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="362350" data-lia-user-login="lherbert501" class="lia-mention lia-mention-user"&gt;lherbert501&lt;/a&gt;&amp;nbsp;, How can this be adapted to return a table?&lt;BR /&gt;I tried simply returning tmpTable3 as suggested but that didn't seem to work.&amp;nbsp; I also tried using the same code from the measure in a Table definition but that returned a blank. table too.&amp;nbsp; What am I doing wrong?&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 10 Apr 2024 09:31:03 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Quick-Measures-Gallery/Patient-Cohort-AND-Slicer/m-p/3826495#M1076</guid>
      <dc:creator>KervBruce</dc:creator>
      <dc:date>2024-04-10T09:31:03Z</dc:date>
    </item>
    <item>
      <title>Re: Patient Cohort (AND Slicer)</title>
      <link>https://community.fabric.microsoft.com/t5/Quick-Measures-Gallery/Patient-Cohort-AND-Slicer/m-p/3827476#M1077</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="430614" data-lia-user-login="KervBruce" class="lia-mention lia-mention-user"&gt;KervBruce&lt;/a&gt;&amp;nbsp;So to adapt this to return a table, you would implement a Complex Selector.&amp;nbsp;&lt;A href="https://community.fabric.microsoft.com/t5/Quick-Measures-Gallery/The-Complex-Selector/m-p/1116633#M534" target="_blank"&gt;The Complex Selector - Microsoft Fabric Community&lt;/A&gt;. The exact solution is going to depend on whether your TagName slicer table is related to your main fact table or coming from your main fact table. Is it or is it a disconnected table?&lt;/P&gt;</description>
      <pubDate>Wed, 10 Apr 2024 13:00:27 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Quick-Measures-Gallery/Patient-Cohort-AND-Slicer/m-p/3827476#M1077</guid>
      <dc:creator>Greg_Deckler</dc:creator>
      <dc:date>2024-04-10T13:00:27Z</dc:date>
    </item>
    <item>
      <title>Re: Patient Cohort (AND Slicer)</title>
      <link>https://community.fabric.microsoft.com/t5/Quick-Measures-Gallery/Patient-Cohort-AND-Slicer/m-p/3926540#M1093</link>
      <description>&lt;P&gt;How can we reflect this measure results to all report pages.&lt;/P&gt;&lt;P&gt;For example: we are having WA table in this Id number,option number, option discrimination are the columns.&lt;/P&gt;&lt;P&gt;Id number is unique (99 distinct ID's)&lt;/P&gt;&lt;P&gt;Option number having duplications(767 distinct option numbers)&lt;/P&gt;&lt;P&gt;In option number slicer we need to get AND condition,we will get the result by above example&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here I need to reflect the multiple option number belonging ID number to all the report pages&amp;nbsp;&lt;/P&gt;&lt;P&gt;How can I achieve it&lt;/P&gt;</description>
      <pubDate>Fri, 17 May 2024 08:49:07 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Quick-Measures-Gallery/Patient-Cohort-AND-Slicer/m-p/3926540#M1093</guid>
      <dc:creator>AnilKumar2vsu</dc:creator>
      <dc:date>2024-05-17T08:49:07Z</dc:date>
    </item>
    <item>
      <title>Re: Patient Cohort (AND Slicer)</title>
      <link>https://community.fabric.microsoft.com/t5/Quick-Measures-Gallery/Patient-Cohort-AND-Slicer/m-p/4368554#M1157</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="313" data-lia-user-login="Greg_Deckler" class="lia-mention lia-mention-user"&gt;Greg_Deckler&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Though this is an old post, I hope you'll be able to answer/help me with my problem.&lt;/P&gt;&lt;P&gt;In my data I have three different categories that I want to use as slicers, and I want to be able to show the projects that "checks off" for all selected categories. I.e, if I select "Environment" and "Red", only project 7 and 10 should show up (not 1,4,5, 8 and 9 - they tick off for one of the two and not both).&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am able to reproduce results similar to yours using my data (sheet; combined in the pbix-file). However, I can only figure out how to do it if I combine all categories into one coloumn (Table - category combined[Value]) and further, 1 slicer. What I want, however, is to have seperate slicers for each category and still only see the projects that "ticks off" for all selected categories (Table, sheet; "Not combined" in PBIX-file).&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I hope this makes sense - If not, please do not hesitate to ask me to clarify.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;MKS&lt;/P&gt;</description>
      <pubDate>Fri, 17 Jan 2025 06:37:27 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Quick-Measures-Gallery/Patient-Cohort-AND-Slicer/m-p/4368554#M1157</guid>
      <dc:creator>magnusks</dc:creator>
      <dc:date>2025-01-17T06:37:27Z</dc:date>
    </item>
  </channel>
</rss>

