<?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: I need Maximum number of &amp;quot;Present&amp;quot; for a particular day. in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/I-need-Maximum-number-of-quot-Present-quot-for-a-particular-day/m-p/3143400#M112344</link>
    <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="532115" data-lia-user-login="Ajendra" class="lia-mention lia-mention-user"&gt;Ajendra&lt;/a&gt;&amp;nbsp;That is what it should be doing, I'll walk you through the code:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Measure = 
    /*
       Get the current date in context assuming you have included Date in your visual
    */
    VAR __Date = MAX('Table'[Date])
    /*
       Return a table filtered to "Present" status
       This table is grouped by Date and __Count column has the count of rows
    */
    VAR __Table = SUMMARIZE(FILTER(ALL('Table'), [Status] = "Present"),[Date],"__Count",COUNTROWS('Table'))
    /*
       Next, we return the maximum count in __Table
    */
    VAR __MaxCount = MAXX(__Table,[__Count])
    /*
       We now return the date that corresponds with the maximum count
       Note, we could have used MINX here as well. Doesn't matter really.
    */
    VAR __MaxCountDate = MAXX(FILTER(__Table,[__Count] = [__Count]),[Date])
    /*
       Now, if the current date (__Date) matches the date for our maximum count,
       we return the maximum count. Otherwise we return BLANK()
    */
    VAR __Result = IF( __Date = __MaxCountDate, __MaxCount, BLANK())
RETURN
    __Result&lt;/LI-CODE&gt;</description>
    <pubDate>Mon, 20 Mar 2023 21:10:58 GMT</pubDate>
    <dc:creator>Greg_Deckler</dc:creator>
    <dc:date>2023-03-20T21:10:58Z</dc:date>
    <item>
      <title>I need Maximum number of "Present" for a particular day.</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/I-need-Maximum-number-of-quot-Present-quot-for-a-particular-day/m-p/3140536#M112112</link>
      <description>&lt;P&gt;I have some data of attendance.&amp;nbsp; i am trying to perform a measure,&amp;nbsp; So when ever i put that measure along datemaster(calender) in Table it should show only that data whereon max number of people were present.&amp;nbsp;&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;Date&lt;/TD&gt;&lt;TD&gt;Status&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;18-Mar-23&lt;/TD&gt;&lt;TD&gt;Present&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;18-Mar-23&lt;/TD&gt;&lt;TD&gt;Present&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;18-Mar-23&lt;/TD&gt;&lt;TD&gt;Present&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;15-Mar-23&lt;/TD&gt;&lt;TD&gt;Present&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;14-Mar-23&lt;/TD&gt;&lt;TD&gt;Absent&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;12-Mar-23&lt;/TD&gt;&lt;TD&gt;Present&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;10-Mar-23&lt;/TD&gt;&lt;TD&gt;HD&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;06-Mar-23&lt;/TD&gt;&lt;TD&gt;Late&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;02-Mar-23&lt;/TD&gt;&lt;TD&gt;Present&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;26-Feb-23&lt;/TD&gt;&lt;TD&gt;Present&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;22-Feb-23&lt;/TD&gt;&lt;TD&gt;Present&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;20-Feb-23&lt;/TD&gt;&lt;TD&gt;Present&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;19-Feb-23&lt;/TD&gt;&lt;TD&gt;Present&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; Regards,&lt;/P&gt;&lt;P&gt;Ajendra Singh Rawat&lt;/P&gt;</description>
      <pubDate>Sun, 19 Mar 2023 01:06:20 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/I-need-Maximum-number-of-quot-Present-quot-for-a-particular-day/m-p/3140536#M112112</guid>
      <dc:creator>Ajendra</dc:creator>
      <dc:date>2023-03-19T01:06:20Z</dc:date>
    </item>
    <item>
      <title>Re: I need Maximum number of "Present" for a particular day.</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/I-need-Maximum-number-of-quot-Present-quot-for-a-particular-day/m-p/3140553#M112114</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="532115" data-lia-user-login="Ajendra" class="lia-mention lia-mention-user"&gt;Ajendra&lt;/a&gt;&amp;nbsp;Sorry, can you elaborate a bit on this? So, you want to show March 18th data? Do you want to just display 18-Mar-23 or ?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Sorry, having trouble following, can you post sample data as text and expected output?&lt;BR /&gt;Not really enough information to go on, please first check if your issue is a common issue listed here: &lt;A href="https://community.powerbi.com/t5/Community-Blog/Before-You-Post-Read-This/ba-p/1116882" target="_blank"&gt;https://community.powerbi.com/t5/Community-Blog/Before-You-Post-Read-This/ba-p/1116882&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Also, please see this post regarding How to Get Your Question Answered Quickly: &lt;A href="https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490" target="_blank"&gt;https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;The most important parts are:&lt;BR /&gt;1. Sample data as text, use the table tool in the editing bar&lt;BR /&gt;2. Expected output from sample data&lt;BR /&gt;3. Explanation in words of how to get from 1. to 2.&lt;/P&gt;</description>
      <pubDate>Sun, 19 Mar 2023 03:22:34 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/I-need-Maximum-number-of-quot-Present-quot-for-a-particular-day/m-p/3140553#M112114</guid>
      <dc:creator>Greg_Deckler</dc:creator>
      <dc:date>2023-03-19T03:22:34Z</dc:date>
    </item>
    <item>
      <title>Re: I need Maximum number of "Present" for a particular day.</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/I-need-Maximum-number-of-quot-Present-quot-for-a-particular-day/m-p/3142862#M112281</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;i am new here may be not aware of how shoud i ask question or query.&lt;/P&gt;&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="313" data-lia-user-login="Greg_Deckler" class="lia-mention lia-mention-user"&gt;Greg_Deckler&lt;/a&gt;&amp;nbsp; thanks a ton. for replying and your precious suggetions&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;here are some point please go through.&lt;/P&gt;&lt;P&gt;1. I want to achive this through the Measure only.&lt;/P&gt;&lt;P&gt;2. i want to use that measure in table which already has a date range.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Consider below image as output table where Measure has been placed:&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Consider below image as raw data table.&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; Regards,&lt;/P&gt;&lt;P&gt;Ajendra Singh&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 20 Mar 2023 16:07:20 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/I-need-Maximum-number-of-quot-Present-quot-for-a-particular-day/m-p/3142862#M112281</guid>
      <dc:creator>Ajendra</dc:creator>
      <dc:date>2023-03-20T16:07:20Z</dc:date>
    </item>
    <item>
      <title>Re: I need Maximum number of "Present" for a particular day.</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/I-need-Maximum-number-of-quot-Present-quot-for-a-particular-day/m-p/3142981#M112289</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="532115" data-lia-user-login="Ajendra" class="lia-mention lia-mention-user"&gt;Ajendra&lt;/a&gt;&amp;nbsp;OK, try this:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Measure = 
    VAR __Date = MAX('Table'[Date])
    VAR __Table = SUMMARIZE(FILTER(ALL('Table'), [Status] = "Present"),[Date],"__Count",COUNTROWS('Table'))
    VAR __MaxCount = MAXX(__Table,[__Count])
    VAR __MaxCountDate = MAXX(FILTER(__Table,[__Count] = [__Count]),[Date])
    VAR __Result = IF( __Date = __MaxCountDate, __MaxCount, BLANK())
RETURN
    __Result&lt;/LI-CODE&gt;</description>
      <pubDate>Mon, 20 Mar 2023 16:57:25 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/I-need-Maximum-number-of-quot-Present-quot-for-a-particular-day/m-p/3142981#M112289</guid>
      <dc:creator>Greg_Deckler</dc:creator>
      <dc:date>2023-03-20T16:57:25Z</dc:date>
    </item>
    <item>
      <title>Re: I need Maximum number of "Present" for a particular day.</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/I-need-Maximum-number-of-quot-Present-quot-for-a-particular-day/m-p/3143238#M112320</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="313" data-lia-user-login="Greg_Deckler" class="lia-mention lia-mention-user"&gt;Greg_Deckler&lt;/a&gt;&amp;nbsp; Thanks for the support i really appreciate your efforts.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;but it is looking bit off.&lt;/P&gt;&lt;P&gt;Because i need Date that should be based on Maximum number of "Present"&lt;/P&gt;&lt;P&gt;not&amp;nbsp;&lt;SPAN&gt;Max date and its No. of "Present"&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thanks!&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 20 Mar 2023 19:28:16 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/I-need-Maximum-number-of-quot-Present-quot-for-a-particular-day/m-p/3143238#M112320</guid>
      <dc:creator>Ajendra</dc:creator>
      <dc:date>2023-03-20T19:28:16Z</dc:date>
    </item>
    <item>
      <title>Re: I need Maximum number of "Present" for a particular day.</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/I-need-Maximum-number-of-quot-Present-quot-for-a-particular-day/m-p/3143400#M112344</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="532115" data-lia-user-login="Ajendra" class="lia-mention lia-mention-user"&gt;Ajendra&lt;/a&gt;&amp;nbsp;That is what it should be doing, I'll walk you through the code:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Measure = 
    /*
       Get the current date in context assuming you have included Date in your visual
    */
    VAR __Date = MAX('Table'[Date])
    /*
       Return a table filtered to "Present" status
       This table is grouped by Date and __Count column has the count of rows
    */
    VAR __Table = SUMMARIZE(FILTER(ALL('Table'), [Status] = "Present"),[Date],"__Count",COUNTROWS('Table'))
    /*
       Next, we return the maximum count in __Table
    */
    VAR __MaxCount = MAXX(__Table,[__Count])
    /*
       We now return the date that corresponds with the maximum count
       Note, we could have used MINX here as well. Doesn't matter really.
    */
    VAR __MaxCountDate = MAXX(FILTER(__Table,[__Count] = [__Count]),[Date])
    /*
       Now, if the current date (__Date) matches the date for our maximum count,
       we return the maximum count. Otherwise we return BLANK()
    */
    VAR __Result = IF( __Date = __MaxCountDate, __MaxCount, BLANK())
RETURN
    __Result&lt;/LI-CODE&gt;</description>
      <pubDate>Mon, 20 Mar 2023 21:10:58 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/I-need-Maximum-number-of-quot-Present-quot-for-a-particular-day/m-p/3143400#M112344</guid>
      <dc:creator>Greg_Deckler</dc:creator>
      <dc:date>2023-03-20T21:10:58Z</dc:date>
    </item>
  </channel>
</rss>

