<?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: Advanced DAX - Group by to get latest record of each person and then categorize the distribution in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Advanced-DAX-Group-by-to-get-latest-record-of-each-person-and/m-p/2282808#M55886</link>
    <description>&lt;P&gt;Hello Jihwan_JHKIM,&lt;BR /&gt;&lt;BR /&gt;It works well. Thanks for your help!&lt;BR /&gt;Cheers,&lt;/P&gt;&lt;P&gt;Tracy&lt;/P&gt;</description>
    <pubDate>Fri, 14 Jan 2022 02:08:58 GMT</pubDate>
    <dc:creator>tracyng0905</dc:creator>
    <dc:date>2022-01-14T02:08:58Z</dc:date>
    <item>
      <title>Advanced DAX - Group by to get latest record of each person and then categorize the distribution</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Advanced-DAX-Group-by-to-get-latest-record-of-each-person-and/m-p/2280090#M55766</link>
      <description>&lt;P&gt;Hi folks,&lt;/P&gt;&lt;P&gt;I have a sample data as shown below. Each student has it CGPA Range per Year, Sem, and Prog.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;The objective is to group the result by CGPA Range per each students' latest result per year.&amp;nbsp;for example,&lt;/P&gt;&lt;P&gt;[Case A] if there is &lt;STRONG&gt;no filter&lt;/STRONG&gt; on semester,&amp;nbsp; SID_002 will count into GPA 2.00-2.29 for Year=2016&amp;nbsp; (Latest Semester =&lt;STRONG&gt;3&lt;/STRONG&gt;)&lt;/P&gt;&lt;P&gt;[Case B] if there is filter on Semester=(&lt;STRONG&gt;1 or 2&lt;/STRONG&gt;), the&amp;nbsp;SID_002 will count into GPA&amp;lt;2.00 for Year=2016&amp;nbsp; (Latest Semester =&lt;STRONG&gt;2&lt;/STRONG&gt;).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The result is expected as below.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Student CGPA distribution by latest CGPA:&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&amp;nbsp;&amp;nbsp;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;However, i tried many DAX&amp;nbsp; but none can return correct result. All DAX looks like just counting student by year, sem, prog, CGPA Range instead of everyone's latest result&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is tth &lt;A title="PBIX Example" href="https://eastechsystems-my.sharepoint.com/:u:/g/personal/tracy_ng_eastech_com_hk/Ed-4rvyfERRCtRUct2vtkTgBn2s_LXhupXwPc8JGflyo2A?e=QRAgIR" target="_self"&gt;PBIX Example&lt;/A&gt;&amp;nbsp;i am working on. Can someone help me?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you very much for your help!!&lt;/P&gt;&lt;P&gt;Tracy&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 12 Jan 2022 19:08:38 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Advanced-DAX-Group-by-to-get-latest-record-of-each-person-and/m-p/2280090#M55766</guid>
      <dc:creator>tracyng0905</dc:creator>
      <dc:date>2022-01-12T19:08:38Z</dc:date>
    </item>
    <item>
      <title>Re: Advanced DAX - Group by to get latest record of each person and then categorize the distribution</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Advanced-DAX-Group-by-to-get-latest-record-of-each-person-and/m-p/2280695#M55794</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;I am not sure if I understood your question correctly, but please check the below measure and the attached pbix file.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;Count V2: =&lt;/EM&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;EM&gt;VAR currentprogram =&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;MAX ( Data[Programme Code] )&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;VAR currentcgpa =&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;MAX ( Cat[CGPA] )&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;VAR currentyear =&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;MAX ( Data[Academic Year] )&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;VAR newtable =&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;GROUPBY (&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;ALLSELECTED ( Data ),&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;Data[Student Number],&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;Data[Academic Year],&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;"@latest", MAXX ( CURRENTGROUP (), Data[YearSem] )&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;)&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;VAR filterbynewtable =&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;CALCULATETABLE (&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;ALLSELECTED ( Data ),&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;TREATAS ( newtable, Data[Student Number], Data[Academic Year], Data[YearSem] )&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;)&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;VAR currentcontext =&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;FILTER (&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;filterbynewtable,&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;Data[Programme Code] = currentprogram&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&amp;amp;&amp;amp; Data[CGPA] = currentcgpa&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&amp;amp;&amp;amp; Data[Academic Year] = currentyear&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;)&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;RETURN&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;COUNTROWS ( currentcontext )&lt;/EM&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 13 Jan 2022 03:42:50 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Advanced-DAX-Group-by-to-get-latest-record-of-each-person-and/m-p/2280695#M55794</guid>
      <dc:creator>Jihwan_Kim</dc:creator>
      <dc:date>2022-01-13T03:42:50Z</dc:date>
    </item>
    <item>
      <title>Re: Advanced DAX - Group by to get latest record of each person and then categorize the distribution</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Advanced-DAX-Group-by-to-get-latest-record-of-each-person-and/m-p/2282808#M55886</link>
      <description>&lt;P&gt;Hello Jihwan_JHKIM,&lt;BR /&gt;&lt;BR /&gt;It works well. Thanks for your help!&lt;BR /&gt;Cheers,&lt;/P&gt;&lt;P&gt;Tracy&lt;/P&gt;</description>
      <pubDate>Fri, 14 Jan 2022 02:08:58 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Advanced-DAX-Group-by-to-get-latest-record-of-each-person-and/m-p/2282808#M55886</guid>
      <dc:creator>tracyng0905</dc:creator>
      <dc:date>2022-01-14T02:08:58Z</dc:date>
    </item>
  </channel>
</rss>

