<?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: Query on slicer in Developer</title>
    <link>https://community.fabric.microsoft.com/t5/Developer/Query-on-slicer/m-p/4086075#M54625</link>
    <description>&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screenshot_2024-08-07-12-32-59-10_87869c5c71fa0655e350912352595c23.jpg" style="width: 1005px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/1146386iED979E88E948A8A2/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Screenshot_2024-08-07-12-32-59-10_87869c5c71fa0655e350912352595c23.jpg" alt="Screenshot_2024-08-07-12-32-59-10_87869c5c71fa0655e350912352595c23.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;thank you @Anonymous&lt;/a&gt;&amp;nbsp;for your response. This is much useful but my requirement need so more additions. I have send you the full requirement details in that image which I'm attaching with this. Thanks in advance&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 07 Aug 2024 07:07:46 GMT</pubDate>
    <dc:creator>PAVITHRA_R_G</dc:creator>
    <dc:date>2024-08-07T07:07:46Z</dc:date>
    <item>
      <title>Query on slicer</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Query-on-slicer/m-p/4077739#M54562</link>
      <description>&lt;P&gt;Hello ,&lt;/P&gt;&lt;P&gt;I have a query. Im having a table with patient id, enrolled from date, activated from date and dropped from date . I want a column which calculate the patient status as enrolled, active and dropped. As per the selection the status should change .. for example if I select 2023 Jan to dec if the patient falls under enrolled from to activation before date then the patient is enrolled. Likewise the status should change but also I need a slicer which have patient status which should change according the date n other filter selections. Can anyone please help me to solve this&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 03 Aug 2024 19:22:17 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Query-on-slicer/m-p/4077739#M54562</guid>
      <dc:creator>PAVITHRA_R_G</dc:creator>
      <dc:date>2024-08-03T19:22:17Z</dc:date>
    </item>
    <item>
      <title>Re: Query on slicer</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Query-on-slicer/m-p/4078790#M54569</link>
      <description>&lt;P&gt;Please provide sample data that covers your issue or question &lt;STRONG&gt;completely&lt;/STRONG&gt;, in a &lt;STRONG&gt;usable&lt;/STRONG&gt; format (not as a screenshot).&lt;BR /&gt;&lt;BR /&gt;Do not include sensitive information or anything not related to the issue or question. &lt;BR /&gt;&lt;BR /&gt;If you are unsure how to upload data please refer to &lt;A href="https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-Forum/ba-p/963216" target="_blank"&gt;https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-Forum/ba-p/963216&lt;/A&gt; &lt;BR /&gt;&lt;BR /&gt;Please show the expected outcome based on the sample data you provided. &lt;BR /&gt;&lt;BR /&gt;Want faster answers? &lt;A href="https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447523" target="_blank"&gt;https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447523&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 04 Aug 2024 15:57:47 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Query-on-slicer/m-p/4078790#M54569</guid>
      <dc:creator>lbendlin</dc:creator>
      <dc:date>2024-08-04T15:57:47Z</dc:date>
    </item>
    <item>
      <title>Re: Query on slicer</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Query-on-slicer/m-p/4079394#M54573</link>
      <description>&lt;P&gt;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/100342"&gt;@lbendlin&lt;/a&gt;&amp;nbsp;, thanks for your concern about this case. I tried to create a sample data myself based on the user's requirement and implemented the result. Please check if there is anything that can be improved. Here is my solution:&lt;BR /&gt;Hi&amp;nbsp; &lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/785444"&gt;@PAVITHRA_R_G&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;I created some data:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="vyangliumsft_0-1722825047951.png" style="width: 400px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/1144620i61B78E7A4D319E68/image-size/medium?v=v2&amp;amp;px=400" role="button" title="vyangliumsft_0-1722825047951.png" alt="vyangliumsft_0-1722825047951.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Here are the steps you can follow：&lt;/P&gt;
&lt;P&gt;Does the statement " if I select 2023 Jan to dec if the patient falls under enrolled from to activation before date then the patient is enrolled " mean that the enrolled date and activated date are before the minimum date selected by the slicer&lt;/P&gt;
&lt;P&gt;1. Create calculated table.&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Table 2 =
CALENDAR(
    DATE(2023,1,1),DATE(2025,12,31))

&lt;/LI-CODE&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="vyangliumsft_1-1722825047953.png" style="width: 400px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/1144619iD3C1B3E5ECDF0C10/image-size/medium?v=v2&amp;amp;px=400" role="button" title="vyangliumsft_1-1722825047953.png" alt="vyangliumsft_1-1722825047953.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;2. Create measure.&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Measure = 
var _mindate=MINX(ALLSELECTED('Table 2'),'Table 2'[Date])
var _minmonthdate=DATE(YEAR(_mindate),MONTH(_mindate),1)
RETURN
IF(
  MAX('Table'[enrolled from date])&amp;lt;_minmonthdate&amp;amp;&amp;amp;MAX('Table'[activated from date])&amp;lt;_minmonthdate,
    "enrolled")&lt;/LI-CODE&gt;
&lt;P&gt;3. Result:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="vyangliumsft_2-1722825078176.png" style="width: 999px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/1144622i459296A568C9B437/image-size/large?v=v2&amp;amp;px=999" role="button" title="vyangliumsft_2-1722825078176.png" alt="vyangliumsft_2-1722825078176.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;As far as I know, only calculated columns can be placed on top of the slicer, you need to use Enter data to create a table containing patient status, using [patient status] as the slicer&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="vyangliumsft_3-1722825225678.png" style="width: 400px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/1144629iA57E1F97BE6975A0/image-size/medium?v=v2&amp;amp;px=400" role="button" title="vyangliumsft_3-1722825225678.png" alt="vyangliumsft_3-1722825225678.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;1. Then create a measure to customize the rules for each status, such as the following:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Test = 
var _mindate=MINX(ALLSELECTED('Table 2'),'Table 2'[Date])
var _minmonthdate=DATE(YEAR(_mindate),MONTH(_mindate),1)
var _status=
SWITCH(
    TRUE(),
    MAX('Table'[enrolled from date])&amp;lt;_minmonthdate&amp;amp;&amp;amp;MAX('Table'[activated from date])&amp;lt;_minmonthdate&amp;amp;&amp;amp;MAX('Table'[dropped from date])&amp;lt;_minmonthdate,"dropped",
    MAX('Table'[enrolled from date])&amp;lt;_minmonthdate&amp;amp;&amp;amp;MAX('Table'[activated from date])&amp;lt;_minmonthdate,
    "enrolled")
return
_status&lt;/LI-CODE&gt;&lt;LI-CODE lang="markup"&gt;Flag =
var _test=
SELECTCOLUMNS(
    'Table',"test",[Test])
RETURN
IF(
    MAX('status table'[patient status]) in _test,1,0)&lt;/LI-CODE&gt;
&lt;P&gt;2. Place [Flag]in Filters, set is=1, apply filter.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="vyangliumsft_4-1722825225679.png" style="width: 400px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/1144628iBA896A561A1CBBB5/image-size/medium?v=v2&amp;amp;px=400" role="button" title="vyangliumsft_4-1722825225679.png" alt="vyangliumsft_4-1722825225679.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;3. Result：&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="vyangliumsft_5-1722825285894.png" style="width: 999px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/1144633i1B4737F04E20D96B/image-size/large?v=v2&amp;amp;px=999" role="button" title="vyangliumsft_5-1722825285894.png" alt="vyangliumsft_5-1722825285894.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;If the above results do not meet your expectations, can you express the expected results in the form of a picture, we can help you better.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;/P&gt;
&lt;P&gt;Liu Yang&lt;/P&gt;
&lt;P&gt;If this post &lt;STRONG&gt;helps&lt;/STRONG&gt;, then please consider &lt;EM&gt;Accept it as the solution&lt;/EM&gt; to help the other members find it more quickly&lt;/P&gt;</description>
      <pubDate>Mon, 05 Aug 2024 02:35:19 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Query-on-slicer/m-p/4079394#M54573</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-08-05T02:35:19Z</dc:date>
    </item>
    <item>
      <title>Re: Query on slicer</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Query-on-slicer/m-p/4086075#M54625</link>
      <description>&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screenshot_2024-08-07-12-32-59-10_87869c5c71fa0655e350912352595c23.jpg" style="width: 1005px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/1146386iED979E88E948A8A2/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Screenshot_2024-08-07-12-32-59-10_87869c5c71fa0655e350912352595c23.jpg" alt="Screenshot_2024-08-07-12-32-59-10_87869c5c71fa0655e350912352595c23.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;thank you @Anonymous&lt;/a&gt;&amp;nbsp;for your response. This is much useful but my requirement need so more additions. I have send you the full requirement details in that image which I'm attaching with this. Thanks in advance&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 07 Aug 2024 07:07:46 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Query-on-slicer/m-p/4086075#M54625</guid>
      <dc:creator>PAVITHRA_R_G</dc:creator>
      <dc:date>2024-08-07T07:07:46Z</dc:date>
    </item>
    <item>
      <title>Re: Query on slicer</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Query-on-slicer/m-p/4090664#M54672</link>
      <description>&lt;P&gt;Hi&amp;nbsp; &lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/785444"&gt;@PAVITHRA_R_G&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here are the steps you can follow：&lt;/P&gt;
&lt;P&gt;1. Create calculated table.&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Date =
CALENDAR(
    DATE(2023,1,1),
    DATE(2024,12,31))&lt;/LI-CODE&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="vyangliumsft_0-1723179853047.png" style="width: 400px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/1147774i4E9467435E1CC52F/image-size/medium?v=v2&amp;amp;px=400" role="button" title="vyangliumsft_0-1723179853047.png" alt="vyangliumsft_0-1723179853047.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;2. Enter data – create a group table.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="vyangliumsft_1-1723179853048.png" style="width: 400px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/1147775iE9F8DFE8E616CA7D/image-size/medium?v=v2&amp;amp;px=400" role="button" title="vyangliumsft_1-1723179853048.png" alt="vyangliumsft_1-1723179853048.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;3. Create measure.&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Measure =
var _mindate=MINX(ALLSELECTED('Date'),'Date'[Date])
var _maxdate=MAXX(ALLSELECTED('Date'),'Date'[Date])
var _column=
SELECTCOLUMNS(FILTER(ALL('Date'),'Date'[Date]&amp;gt;=_mindate&amp;amp;&amp;amp;'Date'[Date]&amp;lt;=_maxdate),"test",[Date])
return
SWITCH(
    TRUE(),
MAX('Table'[Activated from]) in _column &amp;amp;&amp;amp; MAX('Table'[Dropped from]) in _column,"dropped",
MAX('Table'[Enrolled from]) in _column &amp;amp;&amp;amp; MAX('Table'[Activated from]) in _column,"active",
MAX('Table'[Enrolled from]) = MAX('Table'[Activated from]) ,"active")&lt;/LI-CODE&gt;&lt;LI-CODE lang="markup"&gt;Measure 2 =
COUNTX(
    FILTER(ALL('Table'),
    [Measure]=MAX('Group_Table'[Group])),[Person ID])&lt;/LI-CODE&gt;
&lt;P&gt;4. Result:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="vyangliumsft_3-1723179931566.png" style="width: 999px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/1147778i5F88B7CC4E62EB90/image-size/large?v=v2&amp;amp;px=999" role="button" title="vyangliumsft_3-1723179931566.png" alt="vyangliumsft_3-1723179931566.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;/P&gt;
&lt;P&gt;Liu Yang&lt;/P&gt;
&lt;P&gt;If this post &lt;STRONG&gt;helps&lt;/STRONG&gt;, then please consider &lt;EM&gt;Accept it as the solution&lt;/EM&gt; to help the other members find it more quickly&lt;/P&gt;</description>
      <pubDate>Fri, 09 Aug 2024 05:06:12 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Query-on-slicer/m-p/4090664#M54672</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-08-09T05:06:12Z</dc:date>
    </item>
  </channel>
</rss>

