<?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: Help calculating past X years/semesters aggregate data and compare it to this years/semesters data. in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Help-calculating-past-X-years-semesters-aggregate-data-and/m-p/4038313#M160093</link>
    <description>&lt;P&gt;Hi &lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="578282" data-lia-user-login="sarthakgirdhar" class="lia-mention lia-mention-user"&gt;sarthakgirdhar&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;I am glad you have solved the problem. &lt;SPAN&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;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Best Regards,&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Wisdom Wu&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Fri, 12 Jul 2024 01:59:04 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2024-07-12T01:59:04Z</dc:date>
    <item>
      <title>Help calculating past X years/semesters aggregate data and compare it to this years/semesters data.</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Help-calculating-past-X-years-semesters-aggregate-data-and/m-p/4023096#M158750</link>
      <description>&lt;P&gt;Hello Power BI/DAX champions,&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;I need your help with writing a DAX measure. I have a table that looks like this:-&lt;BR /&gt;&lt;BR /&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;I have student grades across multiple semesters. If I simply do an aggregate of student grades across semesters, it looks something like this (&lt;EM&gt;semester_code 202410 translates to 2023/2024 Fall&lt;/EM&gt;) :-&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;img /&gt;&lt;BR /&gt;&lt;BR /&gt;The semester code values are 201710, 201720, 201730, 201810, 201820,...,202330, 202410, 202420.&lt;BR /&gt;&lt;BR /&gt;What I now want is to write a DAX measure such that I have aggregated student grades for the last few semesters so that I can compare it with the most recent results.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Thank you!&lt;/P&gt;</description>
      <pubDate>Wed, 03 Jul 2024 15:39:34 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Help-calculating-past-X-years-semesters-aggregate-data-and/m-p/4023096#M158750</guid>
      <dc:creator>sarthakgirdhar</dc:creator>
      <dc:date>2024-07-03T15:39:34Z</dc:date>
    </item>
    <item>
      <title>Re: Help calculating past X years/semesters aggregate data and compare it to this years/semesters data.</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Help-calculating-past-X-years-semesters-aggregate-data-and/m-p/4024833#M158868</link>
      <description>&lt;P&gt;Hi &lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="578282" data-lia-user-login="sarthakgirdhar" class="lia-mention lia-mention-user"&gt;sarthakgirdhar&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;Based on my testing, please &lt;SPAN&gt;try the following methods:&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;1.Create the sample table.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;2.Create the new column and change the type to number.&lt;/SPAN&gt;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Column = LEFT('Table'[semester_code], 4)&lt;/LI-CODE&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;3.Create the new measure to filter the column.&lt;/SPAN&gt;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Past = 
var _max = MAX('Table 2'[Semester])
RETURN
CALCULATE(
        COUNT('Table'[course_grade]),
        FILTER(
            ALLEXCEPT('Table','Table'[semester_code], 'Table'[course_grade]),
            'Table'[Column] &amp;lt; _max
        )
    )&lt;/LI-CODE&gt;&lt;LI-CODE lang="markup"&gt;Current = 
var _max = MAX('Table 2'[Semester])
RETURN
CALCULATE(
        COUNT('Table'[course_grade]),
        FILTER(
            ALLEXCEPT('Table','Table'[semester_code], 'Table'[course_grade]),
            'Table'[Column] = _max
        )
    )&lt;/LI-CODE&gt;
&lt;P&gt;&lt;SPAN&gt;4.Drag the measure into the table visual. The result is shown below.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;/P&gt;
&lt;P&gt;Wisdom Wu&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;If this post&amp;nbsp;&lt;STRONG&gt;&lt;EM&gt;helps&lt;/EM&gt;&lt;/STRONG&gt;, then 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;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 04 Jul 2024 09:56:19 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Help-calculating-past-X-years-semesters-aggregate-data-and/m-p/4024833#M158868</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-07-04T09:56:19Z</dc:date>
    </item>
    <item>
      <title>Re: Help calculating past X years/semesters aggregate data and compare it to this years/semesters data.</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Help-calculating-past-X-years-semesters-aggregate-data-and/m-p/4037812#M160065</link>
      <description>&lt;P&gt;Hi&amp;nbsp;Anonymous&lt;/a&gt; (Wisdom Wu),&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;I very much appreciate your help. This isn't exactly what I was hoping for; although, I did resolve it in a very similar manner as how you did it &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;BR /&gt;&lt;BR /&gt;Thanks and regards,&lt;BR /&gt;Sarthak Girdhar&lt;/P&gt;</description>
      <pubDate>Thu, 11 Jul 2024 18:12:02 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Help-calculating-past-X-years-semesters-aggregate-data-and/m-p/4037812#M160065</guid>
      <dc:creator>sarthakgirdhar</dc:creator>
      <dc:date>2024-07-11T18:12:02Z</dc:date>
    </item>
    <item>
      <title>Re: Help calculating past X years/semesters aggregate data and compare it to this years/semesters data.</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Help-calculating-past-X-years-semesters-aggregate-data-and/m-p/4038313#M160093</link>
      <description>&lt;P&gt;Hi &lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="578282" data-lia-user-login="sarthakgirdhar" class="lia-mention lia-mention-user"&gt;sarthakgirdhar&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;I am glad you have solved the problem. &lt;SPAN&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;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Best Regards,&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Wisdom Wu&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 12 Jul 2024 01:59:04 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Help-calculating-past-X-years-semesters-aggregate-data-and/m-p/4038313#M160093</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-07-12T01:59:04Z</dc:date>
    </item>
  </channel>
</rss>

