<?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 Dax - create a calculated column referencing a measure in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dax-create-a-calculated-column-referencing-a-measure/m-p/1023986#M13297</link>
    <description>&lt;P&gt;I have a measure (Change %) giving me the % decrease/increase by year from a series of values in the Production table.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to calculate the average decline but only when the Change % is positive.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I think I need to create a Yes/No flag in the Production table to toddle on/off for this to work but I'm open to options.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 14 Apr 2020 06:53:22 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2020-04-14T06:53:22Z</dc:date>
    <item>
      <title>Dax - create a calculated column referencing a measure</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dax-create-a-calculated-column-referencing-a-measure/m-p/1023986#M13297</link>
      <description>&lt;P&gt;I have a measure (Change %) giving me the % decrease/increase by year from a series of values in the Production table.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to calculate the average decline but only when the Change % is positive.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I think I need to create a Yes/No flag in the Production table to toddle on/off for this to work but I'm open to options.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 14 Apr 2020 06:53:22 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dax-create-a-calculated-column-referencing-a-measure/m-p/1023986#M13297</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-04-14T06:53:22Z</dc:date>
    </item>
    <item>
      <title>Re: Dax - create a calculated column referencing a measure</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dax-create-a-calculated-column-referencing-a-measure/m-p/1028553#M13450</link>
      <description>More data/description needed. Would you mind placing a sample file on a shared drive and paste a link to it, please?&lt;BR /&gt;&lt;BR /&gt;Best&lt;BR /&gt;D</description>
      <pubDate>Wed, 15 Apr 2020 22:47:59 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dax-create-a-calculated-column-referencing-a-measure/m-p/1028553#M13450</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-04-15T22:47:59Z</dc:date>
    </item>
    <item>
      <title>Re: Dax - create a calculated column referencing a measure</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dax-create-a-calculated-column-referencing-a-measure/m-p/3434794#M130317</link>
      <description>&lt;P&gt;I understand you're trying to calculate the average decline but only for the years when the Change % is positive. You're right that one way to approach this is by creating a calculated column to flag the rows where the Change % is positive.&lt;/P&gt;
&lt;P&gt;First, you'd create a calculated column in the Production table. Let's call it "PositiveChangeFlag". The formula for this column would be something like:&lt;/P&gt;
&lt;P&gt;PositiveChangeFlag = IF([Change %] &amp;gt; 0, "Yes", "No")&lt;BR /&gt;This will give you a "Yes" for rows where the Change % is positive and "No" otherwise.&lt;/P&gt;
&lt;P&gt;Now, to calculate the average decline for only those years with a positive Change %, you'd create a new measure. Let's call it "Avg Positive Change". The formula would be something like:&lt;/P&gt;
&lt;P&gt;Avg Positive Change = CALCULATE(AVERAGE(Production[Change %]), Production[PositiveChangeFlag] = "Yes")&lt;BR /&gt;This measure will give you the average of the Change % but only for the rows where the PositiveChangeFlag is "Yes".&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 17 Sep 2023 18:19:39 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dax-create-a-calculated-column-referencing-a-measure/m-p/3434794#M130317</guid>
      <dc:creator>technolog</dc:creator>
      <dc:date>2023-09-17T18:19:39Z</dc:date>
    </item>
  </channel>
</rss>

