<?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: Window Function for Student marks in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Window-Function-for-Student-marks/m-p/4016847#M158366</link>
    <description>&lt;P&gt;Here is a radically different approach&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="lbendlin_0-1719710346686.png" style="width: 400px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/1124282iA6F1A57A9B8FCDE4/image-size/medium?v=v2&amp;amp;px=400" role="button" title="lbendlin_0-1719710346686.png" alt="lbendlin_0-1719710346686.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Add all marks together and then subtract the smallest mark.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sun, 30 Jun 2024 01:19:39 GMT</pubDate>
    <dc:creator>lbendlin</dc:creator>
    <dc:date>2024-06-30T01:19:39Z</dc:date>
    <item>
      <title>Window Function for Student marks</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Window-Function-for-Student-marks/m-p/4013399#M158077</link>
      <description>&lt;P&gt;Hi,&lt;BR /&gt;I have issue in finding a solution, please help me with it.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a table "X_Marks",&lt;BR /&gt;where columns are (&lt;STRONG&gt;ResultYear&lt;/STRONG&gt; (ex: 2021-2022), &lt;STRONG&gt;School_ID&lt;/STRONG&gt;, &lt;STRONG&gt;Roll_Number&lt;/STRONG&gt;, &lt;STRONG&gt;Subject_Code&lt;/STRONG&gt;, &lt;STRONG&gt;Marks&lt;/STRONG&gt;).&lt;BR /&gt;The &lt;STRONG&gt;ResultYear &lt;/STRONG&gt;has 2 values&amp;nbsp;(2021-2022 &amp;amp;&amp;nbsp;2022-2023), and&amp;nbsp;&lt;STRONG&gt;Roll_Number&amp;nbsp;&lt;/STRONG&gt;are not unique it has one duplicate value but unique in each&amp;nbsp;&lt;STRONG&gt;ResultYear.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I need a window function of find top 5 subject marks out of 6 subjects of each student(Roll_Number). I tried many things but failed to &lt;SPAN&gt;achieve&lt;/SPAN&gt; the solution.&lt;BR /&gt;&lt;U&gt;My DAX&lt;/U&gt; :&lt;BR /&gt;Top5SubjectTotal = &lt;STRONG&gt;CALCULATE&lt;/STRONG&gt;([Total Marks],&amp;nbsp;&lt;STRONG&gt;FILTER&lt;/STRONG&gt;(&amp;nbsp;&lt;STRONG&gt;ALLSELECTED&lt;/STRONG&gt;(Roll_Number), &lt;STRONG&gt;TOPN&lt;/STRONG&gt;(5, Marks,&amp;nbsp;&lt;STRONG&gt;DESC&lt;/STRONG&gt;));&lt;/P&gt;&lt;P&gt;&lt;U&gt;Issue&lt;/U&gt;&amp;nbsp;:&lt;/P&gt;&lt;P&gt;It worked but, if any subject marks are equal&lt;BR /&gt;(ex: Subject1 = 99,&amp;nbsp;Subject2 = 99,&amp;nbsp;Subject3 = 83,&amp;nbsp;Subject4 = 83,&amp;nbsp;Subject5 = 87,&amp;nbsp;Subject6 = 92)&amp;nbsp;&lt;/P&gt;&lt;P&gt;here 6 subject marks comes as&amp;nbsp;&lt;STRONG&gt;Top3&amp;nbsp;&lt;/STRONG&gt;(as 2 subject marks are equal), So total come as 543 instead of 460.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Kiven_03_0-1719489840944.png" style="width: 400px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/1123235i26718370FC856337/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Kiven_03_0-1719489840944.png" alt="Kiven_03_0-1719489840944.png" /&gt;&lt;/span&gt;&lt;BR /&gt;&lt;BR /&gt;Thank you for your time,&lt;BR /&gt;Vivek &lt;span class="lia-unicode-emoji" title=":grinning_face_with_big_eyes:"&gt;😃&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 27 Jun 2024 12:08:32 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Window-Function-for-Student-marks/m-p/4013399#M158077</guid>
      <dc:creator>Kiven_03</dc:creator>
      <dc:date>2024-06-27T12:08:32Z</dc:date>
    </item>
    <item>
      <title>Re: Window Function for Student marks</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Window-Function-for-Student-marks/m-p/4014360#M158152</link>
      <description>&lt;P&gt;what is your expected result in case of ties? Is it ok to randomly pick subjects?&lt;/P&gt;</description>
      <pubDate>Fri, 28 Jun 2024 01:06:54 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Window-Function-for-Student-marks/m-p/4014360#M158152</guid>
      <dc:creator>lbendlin</dc:creator>
      <dc:date>2024-06-28T01:06:54Z</dc:date>
    </item>
    <item>
      <title>Re: Window Function for Student marks</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Window-Function-for-Student-marks/m-p/4014935#M158193</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/683136"&gt;@Kiven_03&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks for the reply from&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/100342"&gt;@lbendlin&lt;/a&gt;&amp;nbsp;.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Maybe you can try the following:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Top5 = 
SUMX(
    TOPN(
        5, 
        'Table',
        'Table'[Marks]
    ), 
    'Table'[Marks]
)&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Output:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="vxuxinyimsft_0-1719558458109.png" style="width: 400px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/1123698iB0D8D97FE89B4E7D/image-size/medium?v=v2&amp;amp;px=400" role="button" title="vxuxinyimsft_0-1719558458109.png" alt="vxuxinyimsft_0-1719558458109.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;BR /&gt;Yulia Xu&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If this post &lt;EM&gt;&lt;STRONG&gt;helps&lt;/STRONG&gt;&lt;/EM&gt;, then please consider &lt;EM&gt;&lt;STRONG&gt;Accept it as the solution&lt;/STRONG&gt;&lt;/EM&gt; to help the other members find it more quickly.&lt;/P&gt;</description>
      <pubDate>Fri, 28 Jun 2024 07:08:42 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Window-Function-for-Student-marks/m-p/4014935#M158193</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-06-28T07:08:42Z</dc:date>
    </item>
    <item>
      <title>Re: Window Function for Student marks</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Window-Function-for-Student-marks/m-p/4016037#M158289</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/100342"&gt;@lbendlin&lt;/a&gt;&amp;nbsp;,&lt;BR /&gt;Thank you for your reply,&lt;BR /&gt;I was trying to get the total of top5 subject marks out of 6 subjects of a student,&lt;/P&gt;&lt;P&gt;but thing is in student's Marks Table of 3 academic years&amp;nbsp; where student roll in not unique, but unique in each academic year.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 28 Jun 2024 16:42:31 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Window-Function-for-Student-marks/m-p/4016037#M158289</guid>
      <dc:creator>Kiven_03</dc:creator>
      <dc:date>2024-06-28T16:42:31Z</dc:date>
    </item>
    <item>
      <title>Re: Window Function for Student marks</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Window-Function-for-Student-marks/m-p/4016047#M158291</link>
      <description>&lt;P&gt;let's say you have the following marks&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;87,87,83,83,83,83&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;What in your opinion should be the top 5 subjects?&lt;/P&gt;</description>
      <pubDate>Fri, 28 Jun 2024 16:27:50 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Window-Function-for-Student-marks/m-p/4016047#M158291</guid>
      <dc:creator>lbendlin</dc:creator>
      <dc:date>2024-06-28T16:27:50Z</dc:date>
    </item>
    <item>
      <title>Re: Window Function for Student marks</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Window-Function-for-Student-marks/m-p/4016056#M158292</link>
      <description>&lt;P&gt;Thank you very much&amp;nbsp;@Anonymous&amp;nbsp;.&lt;/P&gt;&lt;P&gt;I have already tried this and It didn't work.&lt;BR /&gt;If 50,50,66,72,93,73 are the subjects marks then total&amp;nbsp;marks of 6 subject is 404, and total marks of top 5 is also 404(because all 6 subjects comes under top 5 as 2 subject values are equal). If any marks are equal I am not able get the top 5 total marks.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;I really appericiate for your time &lt;span class="lia-unicode-emoji" title=":grinning_face_with_big_eyes:"&gt;😃&lt;/span&gt;,&amp;nbsp;&lt;BR /&gt;Thank you very much.&lt;BR /&gt;Mean while if I get the solution I will post it.&lt;/P&gt;</description>
      <pubDate>Fri, 28 Jun 2024 16:41:09 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Window-Function-for-Student-marks/m-p/4016056#M158292</guid>
      <dc:creator>Kiven_03</dc:creator>
      <dc:date>2024-06-28T16:41:09Z</dc:date>
    </item>
    <item>
      <title>Re: Window Function for Student marks</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Window-Function-for-Student-marks/m-p/4016771#M158355</link>
      <description>&lt;P&gt;Thanks for your reply&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/100342"&gt;@lbendlin&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;87,87,83,83,83 should be my total of Top5 Subjects and one subject marks needs to be eliminated '83'.&amp;nbsp;&lt;/P&gt;&lt;P&gt;But now I got new doubt, thank you for your valuable reply.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Anyhave please help me with the current senario.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;&lt;P&gt;Vivek&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 29 Jun 2024 20:32:17 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Window-Function-for-Student-marks/m-p/4016771#M158355</guid>
      <dc:creator>Kiven_03</dc:creator>
      <dc:date>2024-06-29T20:32:17Z</dc:date>
    </item>
    <item>
      <title>Re: Window Function for Student marks</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Window-Function-for-Student-marks/m-p/4016776#M158357</link>
      <description>&lt;P&gt;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/100342"&gt;@lbendlin&lt;/a&gt;&amp;nbsp;I was trying to eliminate the 6th value using window function INDEX or MIN function,&lt;/P&gt;&lt;P&gt;but struggling to create a DAX for the expression for it, maybe it bring me the result.&lt;/P&gt;&lt;P&gt;Please help me with it and I appreciate for your time.&lt;/P&gt;</description>
      <pubDate>Sat, 29 Jun 2024 21:23:24 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Window-Function-for-Student-marks/m-p/4016776#M158357</guid>
      <dc:creator>Kiven_03</dc:creator>
      <dc:date>2024-06-29T21:23:24Z</dc:date>
    </item>
    <item>
      <title>Re: Window Function for Student marks</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Window-Function-for-Student-marks/m-p/4016847#M158366</link>
      <description>&lt;P&gt;Here is a radically different approach&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="lbendlin_0-1719710346686.png" style="width: 400px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/1124282iA6F1A57A9B8FCDE4/image-size/medium?v=v2&amp;amp;px=400" role="button" title="lbendlin_0-1719710346686.png" alt="lbendlin_0-1719710346686.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Add all marks together and then subtract the smallest mark.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 30 Jun 2024 01:19:39 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Window-Function-for-Student-marks/m-p/4016847#M158366</guid>
      <dc:creator>lbendlin</dc:creator>
      <dc:date>2024-06-30T01:19:39Z</dc:date>
    </item>
  </channel>
</rss>

