<?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 Sum from results of  IF / AND Measure in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Sum-from-results-of-IF-AND-Measure/m-p/2504286#M69300</link>
    <description>&lt;P&gt;Good Morning..&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;I've written a a quick DAX statement to give me the results i need on line by line basis&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;C_TerminalsNotTagging = &lt;/SPAN&gt;&lt;SPAN&gt;If&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;AND&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;CALCULATE&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;FACT_AML_SSBT_DAILY_SESSIONS_DATA&lt;/SPAN&gt;&lt;SPAN&gt;[NickNameCount]&lt;/SPAN&gt;&lt;SPAN&gt;)&amp;lt;&lt;/SPAN&gt;&lt;SPAN&gt;1&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt;Count&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;__DIM_Terminals[Dim_Terminal_Key]&lt;/SPAN&gt;&lt;SPAN&gt;) &amp;gt;&lt;/SPAN&gt;&lt;SPAN&gt;0&lt;/SPAN&gt;&lt;SPAN&gt;),&lt;/SPAN&gt;&lt;SPAN&gt;1&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt;0&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&lt;SPAN&gt;Which gives me the output below..&lt;BR /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;img /&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What i would now like to do is either sum or count the 1 in that column to give me the total of 2.. However, either i'm having a really bad day or this is more difficult than i 1st thought..&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Any help would be appreciated.&lt;/P&gt;&lt;SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 10 May 2022 09:23:09 GMT</pubDate>
    <dc:creator>ddent1406</dc:creator>
    <dc:date>2022-05-10T09:23:09Z</dc:date>
    <item>
      <title>Sum from results of  IF / AND Measure</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Sum-from-results-of-IF-AND-Measure/m-p/2504286#M69300</link>
      <description>&lt;P&gt;Good Morning..&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;I've written a a quick DAX statement to give me the results i need on line by line basis&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;C_TerminalsNotTagging = &lt;/SPAN&gt;&lt;SPAN&gt;If&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;AND&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;CALCULATE&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;FACT_AML_SSBT_DAILY_SESSIONS_DATA&lt;/SPAN&gt;&lt;SPAN&gt;[NickNameCount]&lt;/SPAN&gt;&lt;SPAN&gt;)&amp;lt;&lt;/SPAN&gt;&lt;SPAN&gt;1&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt;Count&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;__DIM_Terminals[Dim_Terminal_Key]&lt;/SPAN&gt;&lt;SPAN&gt;) &amp;gt;&lt;/SPAN&gt;&lt;SPAN&gt;0&lt;/SPAN&gt;&lt;SPAN&gt;),&lt;/SPAN&gt;&lt;SPAN&gt;1&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt;0&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&lt;SPAN&gt;Which gives me the output below..&lt;BR /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;img /&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What i would now like to do is either sum or count the 1 in that column to give me the total of 2.. However, either i'm having a really bad day or this is more difficult than i 1st thought..&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Any help would be appreciated.&lt;/P&gt;&lt;SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 10 May 2022 09:23:09 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Sum-from-results-of-IF-AND-Measure/m-p/2504286#M69300</guid>
      <dc:creator>ddent1406</dc:creator>
      <dc:date>2022-05-10T09:23:09Z</dc:date>
    </item>
    <item>
      <title>Re: Sum from results of  IF / AND Measure</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Sum-from-results-of-IF-AND-Measure/m-p/2504574#M69311</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="314881" data-lia-user-login="ddent1406" class="lia-mention lia-mention-user"&gt;ddent1406&lt;/a&gt;&amp;nbsp;the general answer is to wrap your measuere with SUMX.&lt;BR /&gt;The important thing is what to put in the first statement and that is depandant on your model and desired visual.&lt;BR /&gt;For a specific visual you need to put all the columns that play affect in the matrix rows, and if they come from different tables you need to use for example summarize like what I wrote.&lt;BR /&gt;Hard to say without seeing your model and which are the relevant columns in your matrix / table visual but I wrote here the general code for that and see if you can easily adjust to your column names:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;C_TerminalsNotTagging = 
SUMX(
   SUMMARIZE (
   		FACT_AML_SSBT_DAILY_SESSIONS_DATA,
   		Dim1[Column 1],
   		Dim2[Column 2],
   		... ,
   		... ,
   		... ,
   		FACT_AML_SSBT_DAILY_SESSIONS_DATA[Column3]
   	),
	If(AND(CALCULATE(FACT_AML_SSBT_DAILY_SESSIONS_DATA[NickNameCount])&amp;lt;1,Count(__DIM_Terminals[Dim_Terminal_Key]) &amp;gt;0),1,0)
)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.powerbi.com/t5/Data-Stories-Gallery/Contoso-by-SpartaBI/m-p/2449543" target="_blank" rel="noopener"&gt;Showcase Report – Contoso By SpartaBI&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;A href="https://www.spartabi.com" target="_blank" rel="noopener"&gt;&lt;img /&gt;&lt;/A&gt;&amp;nbsp;&amp;nbsp;&lt;A href="https://www.linkedin.com/company/spartabi" target="_blank" rel="noopener"&gt;&lt;img /&gt;&lt;/A&gt; &amp;nbsp;&amp;nbsp;&lt;A href="https://www.facebook.com/SpartaBI" target="_blank" rel="noopener"&gt;&lt;img /&gt;&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="https://www.spartabi.com" target="_blank" rel="noopener"&gt;&lt;img /&gt;&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 10 May 2022 11:00:41 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Sum-from-results-of-IF-AND-Measure/m-p/2504574#M69311</guid>
      <dc:creator>SpartaBI</dc:creator>
      <dc:date>2022-05-10T11:00:41Z</dc:date>
    </item>
    <item>
      <title>Re: Sum from results of  IF / AND Measure</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Sum-from-results-of-IF-AND-Measure/m-p/2504875#M69331</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hi SpartaBI ,&amp;nbsp;&lt;BR /&gt;worked great , had to chnage the if statement around a bit.. but got the result i wanted.&amp;nbsp;&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;</description>
      <pubDate>Tue, 10 May 2022 12:55:29 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Sum-from-results-of-IF-AND-Measure/m-p/2504875#M69331</guid>
      <dc:creator>ddent1406</dc:creator>
      <dc:date>2022-05-10T12:55:29Z</dc:date>
    </item>
    <item>
      <title>Re: Sum from results of  IF / AND Measure</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Sum-from-results-of-IF-AND-Measure/m-p/2504889#M69332</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="314881" data-lia-user-login="ddent1406" class="lia-mention lia-mention-user"&gt;ddent1406&lt;/a&gt;&amp;nbsp;my pleasure &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.powerbi.com/t5/Data-Stories-Gallery/Contoso-by-SpartaBI/m-p/2449543" target="_blank" rel="noopener"&gt;Showcase Report – Contoso By SpartaBI&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;A href="https://www.spartabi.com" target="_blank" rel="noopener"&gt;&lt;img /&gt;&lt;/A&gt;&amp;nbsp;&amp;nbsp;&lt;A href="https://www.linkedin.com/company/spartabi" target="_blank" rel="noopener"&gt;&lt;img /&gt;&lt;/A&gt; &amp;nbsp;&amp;nbsp;&lt;A href="https://www.facebook.com/SpartaBI" target="_blank" rel="noopener"&gt;&lt;img /&gt;&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="https://www.spartabi.com" target="_blank" rel="noopener"&gt;&lt;img /&gt;&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 10 May 2022 12:58:44 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Sum-from-results-of-IF-AND-Measure/m-p/2504889#M69332</guid>
      <dc:creator>SpartaBI</dc:creator>
      <dc:date>2022-05-10T12:58:44Z</dc:date>
    </item>
  </channel>
</rss>

