<?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: Calculate with measures in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-with-measures/m-p/2330696#M58553</link>
    <description>&lt;P&gt;We have basically three functions at work here. Separated by colour.&lt;/P&gt;&lt;P&gt;&lt;FONT color="#FF0000"&gt;COUNTX&lt;/FONT&gt;(&lt;FONT color="#99CC00"&gt;filter(&lt;/FONT&gt;&lt;FONT color="#CC99FF"&gt;values( 'Client'[ID])&lt;/FONT&gt; , &lt;FONT color="#99CC00"&gt;[Final Score] &amp;gt; [Initial Score] )&lt;/FONT&gt;, &lt;FONT color="#FF0000"&gt;[Client ID] ))&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;Let's break it down from the innermost arguments:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;values( 'Client'[ID]) - gives us a list of unique values from the column&amp;nbsp;'Client'[ID]&lt;BR /&gt;&lt;BR /&gt;&lt;/LI&gt;&lt;LI&gt;filter(values( 'Client'[ID]) , [Final Score] &amp;gt; [Initial Score] ) - Now that we have a list of unique values of 'Client'[ID], we filtered these values where the condition '[Final Score] &amp;gt; [Initial Score]' holds true using the filter() function.&lt;/LI&gt;&lt;LI&gt;COUNTX(filter(values( 'Client'[ID]) , [Final Score] &amp;gt; [Initial Score] ), [Client ID] )) - This function simply gives the count of the filtered values of&amp;nbsp;'Client'[ID] received from the filter() function mentioned above.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;In this we we find the count of&amp;nbsp;'Client'[ID]) where&amp;nbsp;[Final Score] &amp;gt; [Initial Score].&lt;/P&gt;&lt;P&gt;In case you need to understand in detail each of these functions you can use &lt;A href="http://dax.guide" target="_blank" rel="noopener"&gt;dax.guide&lt;/A&gt;&amp;nbsp;&lt;BR /&gt;Hope this helps.&lt;/P&gt;</description>
    <pubDate>Thu, 10 Feb 2022 11:08:03 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2022-02-10T11:08:03Z</dc:date>
    <item>
      <title>Calculate with measures</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-with-measures/m-p/2330462#M58526</link>
      <description>&lt;DIV class=""&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;I am trying to create a measure which returns all 'ClientIDs' with a higher final score.&amp;nbsp;&lt;/DIV&gt;&lt;DIV class=""&gt;I have Two measures 'Initial Score' &amp;amp; 'Final Score, the DAX for them is below&amp;nbsp;&lt;/DIV&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;P&gt;CALCULATE(SUM('Client')'[Total Score]),'Client[Stage] = "Final")&lt;/P&gt;&lt;P&gt;CALCULATE(SUM('Client')'[Total Score]),'Client[Stage] = "Initial")&lt;/P&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I now wish to create measure the third measure which return all the 'ClientIDs' that have a higher final score.&lt;/P&gt;&lt;P&gt;A bit lost on how to go about it, this is what i currently have which does not work.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Would appreciate any help and advice&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;CALCULATE( COUNT( 'Client'[ID]) , [Final Score] &amp;gt; [Initial Score] )&lt;/P&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Thu, 10 Feb 2022 09:16:22 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-with-measures/m-p/2330462#M58526</guid>
      <dc:creator>edcdcpowerbi</dc:creator>
      <dc:date>2022-02-10T09:16:22Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate with measures</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-with-measures/m-p/2330509#M58531</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="324851" data-lia-user-login="edcdcpowerbi" class="lia-mention lia-mention-user"&gt;edcdcpowerbi&lt;/a&gt; ,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Try like&lt;/P&gt;
&lt;P&gt;CALCULATE( COUNTX(filter(values( 'Client'[ID]) , [Final Score] &amp;gt; [Initial Score] ), [Client ID] ))&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;if needed add a filter in these two too&lt;/P&gt;
&lt;DIV class=""&gt;
&lt;P&gt;CALCULATE(SUM('Client')'[Total Score]),filter('Client , 'Client[Stage] = "Final"))&lt;/P&gt;
&lt;P&gt;CALCULATE(SUM('Client')'[Total Score]),filter('Client , 'Client[Stage] = "Initial") )&lt;/P&gt;
&lt;/DIV&gt;</description>
      <pubDate>Thu, 10 Feb 2022 09:32:41 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-with-measures/m-p/2330509#M58531</guid>
      <dc:creator>amitchandak</dc:creator>
      <dc:date>2022-02-10T09:32:41Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate with measures</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-with-measures/m-p/2330596#M58542</link>
      <description>&lt;P&gt;Thankyou, that works perfectly, are you ok to give a breakdown as to what is happening in the measure, I'm new to DAX so would love to understand more!&lt;/P&gt;</description>
      <pubDate>Thu, 10 Feb 2022 10:05:32 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-with-measures/m-p/2330596#M58542</guid>
      <dc:creator>edcdcpowerbi</dc:creator>
      <dc:date>2022-02-10T10:05:32Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate with measures</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-with-measures/m-p/2330696#M58553</link>
      <description>&lt;P&gt;We have basically three functions at work here. Separated by colour.&lt;/P&gt;&lt;P&gt;&lt;FONT color="#FF0000"&gt;COUNTX&lt;/FONT&gt;(&lt;FONT color="#99CC00"&gt;filter(&lt;/FONT&gt;&lt;FONT color="#CC99FF"&gt;values( 'Client'[ID])&lt;/FONT&gt; , &lt;FONT color="#99CC00"&gt;[Final Score] &amp;gt; [Initial Score] )&lt;/FONT&gt;, &lt;FONT color="#FF0000"&gt;[Client ID] ))&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;Let's break it down from the innermost arguments:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;values( 'Client'[ID]) - gives us a list of unique values from the column&amp;nbsp;'Client'[ID]&lt;BR /&gt;&lt;BR /&gt;&lt;/LI&gt;&lt;LI&gt;filter(values( 'Client'[ID]) , [Final Score] &amp;gt; [Initial Score] ) - Now that we have a list of unique values of 'Client'[ID], we filtered these values where the condition '[Final Score] &amp;gt; [Initial Score]' holds true using the filter() function.&lt;/LI&gt;&lt;LI&gt;COUNTX(filter(values( 'Client'[ID]) , [Final Score] &amp;gt; [Initial Score] ), [Client ID] )) - This function simply gives the count of the filtered values of&amp;nbsp;'Client'[ID] received from the filter() function mentioned above.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;In this we we find the count of&amp;nbsp;'Client'[ID]) where&amp;nbsp;[Final Score] &amp;gt; [Initial Score].&lt;/P&gt;&lt;P&gt;In case you need to understand in detail each of these functions you can use &lt;A href="http://dax.guide" target="_blank" rel="noopener"&gt;dax.guide&lt;/A&gt;&amp;nbsp;&lt;BR /&gt;Hope this helps.&lt;/P&gt;</description>
      <pubDate>Thu, 10 Feb 2022 11:08:03 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-with-measures/m-p/2330696#M58553</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-02-10T11:08:03Z</dc:date>
    </item>
  </channel>
</rss>

