<?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 Row based Column Flag in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Row-based-Column-Flag/m-p/2863622#M92257</link>
    <description>&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;i want the desired column in dax calculated column or measure on my data i want to write dax to show my desire result as&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;i have opened last topic that i got DAX&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;=IF(CALCULATE(DISTINCTCOUNT(Table[Shift]),ALLEXCEPT(Table,Table[EMPLID]))&amp;gt;1,"Both","Single")&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;but in this dax i also want to exlude OnCall rows as welll so that my filter "Desired" column only show SINGle and Both but exclude on call as well&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Like if i select &lt;STRONG&gt;Single&lt;/STRONG&gt; it should show 2 and if i select &lt;STRONG&gt;Both&lt;/STRONG&gt; then it should show 2 &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;in my dax it showing 4 when i&amp;nbsp;&lt;STRONG&gt;Single&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;thanks in advance&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 26 Oct 2022 06:35:53 GMT</pubDate>
    <dc:creator>shahzad667</dc:creator>
    <dc:date>2022-10-26T06:35:53Z</dc:date>
    <item>
      <title>Row based Column Flag</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Row-based-Column-Flag/m-p/2863622#M92257</link>
      <description>&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;i want the desired column in dax calculated column or measure on my data i want to write dax to show my desire result as&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;i have opened last topic that i got DAX&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;=IF(CALCULATE(DISTINCTCOUNT(Table[Shift]),ALLEXCEPT(Table,Table[EMPLID]))&amp;gt;1,"Both","Single")&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;but in this dax i also want to exlude OnCall rows as welll so that my filter "Desired" column only show SINGle and Both but exclude on call as well&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Like if i select &lt;STRONG&gt;Single&lt;/STRONG&gt; it should show 2 and if i select &lt;STRONG&gt;Both&lt;/STRONG&gt; then it should show 2 &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;in my dax it showing 4 when i&amp;nbsp;&lt;STRONG&gt;Single&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;thanks in advance&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 26 Oct 2022 06:35:53 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Row-based-Column-Flag/m-p/2863622#M92257</guid>
      <dc:creator>shahzad667</dc:creator>
      <dc:date>2022-10-26T06:35:53Z</dc:date>
    </item>
    <item>
      <title>Re: Row based Column Flag</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Row-based-Column-Flag/m-p/2863644#M92261</link>
      <description>&lt;P&gt;calculated column code&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;=IF(Table[Shift]="OnCall","OnCall",IF(CALCULATE(DISTINCTCOUNT(Table[Shift]),ALLEXCEPT(Table,Table[EMPLID]),Table[Shift]&amp;lt;&amp;gt;"OnCall")&amp;gt;1,"Both","Single"))&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 26 Oct 2022 06:49:23 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Row-based-Column-Flag/m-p/2863644#M92261</guid>
      <dc:creator>wdx223_Daniel</dc:creator>
      <dc:date>2022-10-26T06:49:23Z</dc:date>
    </item>
    <item>
      <title>Re: Row based Column Flag</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Row-based-Column-Flag/m-p/2863702#M92262</link>
      <description>&lt;P&gt;Thats ok but in this senerio my filter will show 3 selection but in future if there will another shift will come like "halfday" then this will not work or i have to edit this dax , can it is possible that Dax will only entertain Single and Both Values only if there is Day and Night&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;like&amp;nbsp;&lt;/P&gt;&lt;P&gt;Both will show if there is any day or night have more then one value , and single will show single value of day or night except all will not show or can be named "Others"&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;hope you got my point&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 26 Oct 2022 07:04:13 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Row-based-Column-Flag/m-p/2863702#M92262</guid>
      <dc:creator>shahzad667</dc:creator>
      <dc:date>2022-10-26T07:04:13Z</dc:date>
    </item>
    <item>
      <title>Re: Row based Column Flag</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Row-based-Column-Flag/m-p/2866819#M92397</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="365103" data-lia-user-login="shahzad667" class="lia-mention lia-mention-user"&gt;shahzad667&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;I have created a simple sample, please refer to it to see if it helps you.&lt;/P&gt;
&lt;P&gt;Create a column.&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Column =
VAR _count =
    CALCULATE (
        COUNT ( 'Table'[shift] ),
        FILTER (
            'Table',
            'Table'[emplied] = EARLIER ( 'Table'[emplied] )
                &amp;amp;&amp;amp; 'Table'[shift] &amp;lt;&amp;gt; "Oncall"
        )
    )
RETURN
    IF ( _count = 2, "Both", IF ( _count = 1, "Single", BLANK () ) )
&lt;/LI-CODE&gt;
&lt;P&gt;Then create a measure.&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Measure =
CALCULATE (
    DISTINCTCOUNT ( 'Table'[emplied] ),
    FILTER (
        ALL ( 'Table' ),
        'Table'[Column] &amp;lt;&amp;gt; BLANK ()
            &amp;amp;&amp;amp; 'Table'[Column] = SELECTEDVALUE ( 'Table'[Column] )
    )
)
&lt;/LI-CODE&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If I have misunderstood your meaning, please provide more details with your desired output and pbix file without privacy inforamtion.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards&lt;/P&gt;
&lt;P&gt;Community Support Team _ Polly&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.&lt;/P&gt;</description>
      <pubDate>Thu, 27 Oct 2022 06:29:22 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Row-based-Column-Flag/m-p/2866819#M92397</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-10-27T06:29:22Z</dc:date>
    </item>
  </channel>
</rss>

