<?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: Where Answer is 'Yes' in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Where-Answer-is-Yes/m-p/2423907#M64310</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="315639" data-lia-user-login="acg" class="lia-mention lia-mention-user"&gt;acg&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;I just want to confirm have you tried the solution shared by&amp;nbsp;tamerj1&amp;nbsp;and Aditya_Meshram&amp;nbsp;? Do they help?&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;If you still need help,&amp;nbsp;&lt;/SPAN&gt;usually information below is needed, could you provide it? Thanks.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;(1)&amp;nbsp;&lt;STRONG&gt;&lt;U&gt;a sample file&lt;/U&gt;&lt;/STRONG&gt;, you can replace raw data with bogus data to protect your privacy.&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;STRONG&gt;or&amp;nbsp;&lt;U&gt;provide some sample data&lt;/U&gt;&lt;/STRONG&gt;&amp;nbsp;that fully covers your issue/question.&lt;/P&gt;
&lt;P&gt;(2)&amp;nbsp;&lt;STRONG&gt;give your expected result&lt;/STRONG&gt;&amp;nbsp;based on the sample you provide. If calculation formula is involved, please provide it.&lt;/P&gt;
&lt;P&gt;Kindly note: Please ensure the data in sample is concise and representative.&lt;/P&gt;
&lt;P&gt;Thanks.&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 _Tang&lt;/P&gt;
&lt;P&gt;If this post&amp;nbsp;&lt;STRONG&gt;helps&lt;/STRONG&gt;, please consider&amp;nbsp;&lt;STRONG&gt;&lt;EM&gt;Accept it as the solution&lt;/EM&gt;&lt;/STRONG&gt;&amp;nbsp;to help the other members find it more quickly.&lt;/P&gt;</description>
    <pubDate>Tue, 29 Mar 2022 10:11:58 GMT</pubDate>
    <dc:creator>v-xiaotang</dc:creator>
    <dc:date>2022-03-29T10:11:58Z</dc:date>
    <item>
      <title>Where Answer is 'Yes'</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Where-Answer-is-Yes/m-p/2417075#M63855</link>
      <description>&lt;P&gt;I want to calculate the number of Entities that had international Presence (= INT) in the last Year.&lt;/P&gt;&lt;P&gt;International Presence is determined by answering to [Question Code]&amp;nbsp;=&amp;nbsp;"Q0035" with&amp;nbsp;&lt;SPAN&gt;[Answer]&lt;/SPAN&gt;&lt;SPAN&gt; = &lt;/SPAN&gt;&lt;SPAN&gt;"Yes"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;As such the below calculation works EXCEPT when I add the filter&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;'Fact QNA'[Answer] = "Yes"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Is there a different way in DAX to introduce the "where&amp;nbsp;'Fact QNA'[Answer] = "Yes" ?&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;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp;Number INT Presence Year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&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;'Fact QNA'[Companies]&lt;/SPAN&gt;&lt;SPAN&gt;),&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;'Fact QNA'[Answer]&lt;/SPAN&gt;&lt;SPAN&gt; = &lt;/SPAN&gt;&lt;SPAN&gt;"Yes"&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;'Dim Questions'[Question Code]&lt;/SPAN&gt;&lt;SPAN&gt; = &lt;/SPAN&gt;&lt;SPAN&gt;"Q0035"&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;'Dim Submission Date'[year]&lt;/SPAN&gt;&lt;SPAN&gt; = &lt;/SPAN&gt;&lt;SPAN&gt;MAXYSD&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Fri, 25 Mar 2022 07:52:23 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Where-Answer-is-Yes/m-p/2417075#M63855</guid>
      <dc:creator>acg</dc:creator>
      <dc:date>2022-03-25T07:52:23Z</dc:date>
    </item>
    <item>
      <title>Re: Where Answer is 'Yes'</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Where-Answer-is-Yes/m-p/2417177#M63858</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="315639" data-lia-user-login="acg" class="lia-mention lia-mention-user"&gt;acg&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;can you please try&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt; Number INT Presence YearMax =
VAR MAXSD = CALCULATE(MAX('Dim Submission Date'[date]),ALLSELECTED('Dim Submission Date'))
VAR MAXYSD = CALCULATE(MAX('Dim Submission Date'[year]),'Dim Submission Date'[date] = MAXSD)
RETURN
CALCULATE
(
COUNT('Fact QNA'[Companies]),
'Fact QNA'[Answer] = "Yes" &amp;amp;&amp;amp; 'Dim Questions'[Question Code] = "Q0035",
'Dim Submission Date'[year] = MAXYSD
)&lt;/LI-CODE&gt;</description>
      <pubDate>Fri, 25 Mar 2022 08:22:16 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Where-Answer-is-Yes/m-p/2417177#M63858</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-03-25T08:22:16Z</dc:date>
    </item>
    <item>
      <title>Re: Where Answer is 'Yes'</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Where-Answer-is-Yes/m-p/2417240#M63860</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="315639" data-lia-user-login="acg" class="lia-mention lia-mention-user"&gt;acg&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;you may try&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;Number INT Presence YearMax =
VAR MAXYSD =
    MAX ( 'Dim Submission Date'[year] )
RETURN
    CALCULATE (
        COUNT ( 'Fact QNA'[Companies] ),
        'Fact QNA'[Answer] = "Yes",
        FILTER ( 'Dim Questions', 'Dim Questions'[Question Code] = "Q0035" ),
        FILTER ( 'Dim Submission Date', 'Dim Submission Date'[year] = MAXYSD )
    )&lt;/LI-CODE&gt;&lt;P&gt;Also it is worth it toc check the source data for possible spaces after or before "Yes"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 25 Mar 2022 08:40:22 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Where-Answer-is-Yes/m-p/2417240#M63860</guid>
      <dc:creator>tamerj1</dc:creator>
      <dc:date>2022-03-25T08:40:22Z</dc:date>
    </item>
    <item>
      <title>Re: Where Answer is 'Yes'</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Where-Answer-is-Yes/m-p/2423907#M64310</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="315639" data-lia-user-login="acg" class="lia-mention lia-mention-user"&gt;acg&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;I just want to confirm have you tried the solution shared by&amp;nbsp;tamerj1&amp;nbsp;and Aditya_Meshram&amp;nbsp;? Do they help?&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;If you still need help,&amp;nbsp;&lt;/SPAN&gt;usually information below is needed, could you provide it? Thanks.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;(1)&amp;nbsp;&lt;STRONG&gt;&lt;U&gt;a sample file&lt;/U&gt;&lt;/STRONG&gt;, you can replace raw data with bogus data to protect your privacy.&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;STRONG&gt;or&amp;nbsp;&lt;U&gt;provide some sample data&lt;/U&gt;&lt;/STRONG&gt;&amp;nbsp;that fully covers your issue/question.&lt;/P&gt;
&lt;P&gt;(2)&amp;nbsp;&lt;STRONG&gt;give your expected result&lt;/STRONG&gt;&amp;nbsp;based on the sample you provide. If calculation formula is involved, please provide it.&lt;/P&gt;
&lt;P&gt;Kindly note: Please ensure the data in sample is concise and representative.&lt;/P&gt;
&lt;P&gt;Thanks.&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 _Tang&lt;/P&gt;
&lt;P&gt;If this post&amp;nbsp;&lt;STRONG&gt;helps&lt;/STRONG&gt;, please consider&amp;nbsp;&lt;STRONG&gt;&lt;EM&gt;Accept it as the solution&lt;/EM&gt;&lt;/STRONG&gt;&amp;nbsp;to help the other members find it more quickly.&lt;/P&gt;</description>
      <pubDate>Tue, 29 Mar 2022 10:11:58 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Where-Answer-is-Yes/m-p/2423907#M64310</guid>
      <dc:creator>v-xiaotang</dc:creator>
      <dc:date>2022-03-29T10:11:58Z</dc:date>
    </item>
  </channel>
</rss>

