<?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 Grouped line chart that shows count per month in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Grouped-line-chart-that-shows-count-per-month/m-p/3871356#M151231</link>
    <description>&lt;P&gt;Hi, I have a problem getting the output that I need.&lt;/P&gt;&lt;P&gt;I have a dataset ('data') with two columns ('name' and 'date'). What I want is very simple (at least I thought so):&lt;/P&gt;&lt;P&gt;I want the following grouped line chart:&lt;/P&gt;&lt;P&gt;- It is grouped by name&lt;/P&gt;&lt;P&gt;- The x-axis is date&lt;/P&gt;&lt;P&gt;- The y-axis should give the percentage of rows of a specific name in a specific date relative to all rows that date.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So if there are 10 rows on the first of march, and there are two rows with the name 'Peter' on the 1st of march, I want the percentage of 'Peter' on the first of march to be 20%.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;As simple as that. From what i've read, it must be done using DAX, however, I cannot find the right query. Right now I have&lt;BR /&gt;DIVIDE(&lt;BR /&gt;&amp;nbsp; &amp;nbsp; COUNTROWS(FILTER('data', 'data'[Name] = EARLIER('data'[Name]))),&lt;BR /&gt;&amp;nbsp; &amp;nbsp; CALCULATE(COUNTROWS('data'), ALLEXCEPT('data', 'data'[Date]))&lt;BR /&gt;) * 100&lt;/P&gt;&lt;P&gt;But this does not seem to give the right answer.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can anybody please help me out?&lt;/P&gt;</description>
    <pubDate>Fri, 26 Apr 2024 14:59:02 GMT</pubDate>
    <dc:creator>petervandenberg</dc:creator>
    <dc:date>2024-04-26T14:59:02Z</dc:date>
    <item>
      <title>Grouped line chart that shows count per month</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Grouped-line-chart-that-shows-count-per-month/m-p/3871356#M151231</link>
      <description>&lt;P&gt;Hi, I have a problem getting the output that I need.&lt;/P&gt;&lt;P&gt;I have a dataset ('data') with two columns ('name' and 'date'). What I want is very simple (at least I thought so):&lt;/P&gt;&lt;P&gt;I want the following grouped line chart:&lt;/P&gt;&lt;P&gt;- It is grouped by name&lt;/P&gt;&lt;P&gt;- The x-axis is date&lt;/P&gt;&lt;P&gt;- The y-axis should give the percentage of rows of a specific name in a specific date relative to all rows that date.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So if there are 10 rows on the first of march, and there are two rows with the name 'Peter' on the 1st of march, I want the percentage of 'Peter' on the first of march to be 20%.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;As simple as that. From what i've read, it must be done using DAX, however, I cannot find the right query. Right now I have&lt;BR /&gt;DIVIDE(&lt;BR /&gt;&amp;nbsp; &amp;nbsp; COUNTROWS(FILTER('data', 'data'[Name] = EARLIER('data'[Name]))),&lt;BR /&gt;&amp;nbsp; &amp;nbsp; CALCULATE(COUNTROWS('data'), ALLEXCEPT('data', 'data'[Date]))&lt;BR /&gt;) * 100&lt;/P&gt;&lt;P&gt;But this does not seem to give the right answer.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can anybody please help me out?&lt;/P&gt;</description>
      <pubDate>Fri, 26 Apr 2024 14:59:02 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Grouped-line-chart-that-shows-count-per-month/m-p/3871356#M151231</guid>
      <dc:creator>petervandenberg</dc:creator>
      <dc:date>2024-04-26T14:59:02Z</dc:date>
    </item>
    <item>
      <title>Re: Grouped line chart that shows count per month</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Grouped-line-chart-that-shows-count-per-month/m-p/3871936#M151257</link>
      <description>&lt;P&gt;Please provide sample data that covers your issue or question &lt;STRONG&gt;completely&lt;/STRONG&gt;, in a &lt;STRONG&gt;usable&lt;/STRONG&gt; format (not as a screenshot).&lt;BR /&gt;&lt;BR /&gt;Do not include sensitive information or anything not related to the issue or question. &lt;BR /&gt;&lt;BR /&gt;If you are unsure how to upload data please refer to &lt;A href="https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-Forum/ba-p/963216" target="_blank"&gt;https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-Forum/ba-p/963216&lt;/A&gt; &lt;BR /&gt;&lt;BR /&gt;Please show the expected outcome based on the sample data you provided. &lt;BR /&gt;&lt;BR /&gt;Want faster answers? &lt;A href="https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447523" target="_blank"&gt;https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447523&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 27 Apr 2024 01:22:27 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Grouped-line-chart-that-shows-count-per-month/m-p/3871936#M151257</guid>
      <dc:creator>lbendlin</dc:creator>
      <dc:date>2024-04-27T01:22:27Z</dc:date>
    </item>
    <item>
      <title>Re: Grouped line chart that shows count per month</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Grouped-line-chart-that-shows-count-per-month/m-p/3874384#M151327</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="732689" data-lia-user-login="petervandenberg" class="lia-mention lia-mention-user"&gt;petervandenberg&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;According to your description, here are my steps you can follow as a solution.&lt;/P&gt;
&lt;P&gt;(1) This is my test data.&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;(2) We can create a measure.&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;percentage = 
var _a=COUNTROWS(FILTER(ALLSELECTED('Table'),[date]=MAX('Table'[date])))
var _b=COUNTROWS(FILTER(ALLSELECTED('Table'),[date]=MAX('Table'[date]) &amp;amp;&amp;amp; [name]= MAX('Table'[name])))
RETURN DIVIDE(_b,_a,0)&lt;/LI-CODE&gt;
&lt;P&gt;(3) Then the result is as follows.&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;If I have misunderstood your needs, please clarify in a follow-up reply.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;/P&gt;
&lt;P&gt;Neeko Tang&lt;/P&gt;
&lt;P&gt;If this post  &lt;STRONG&gt;&lt;EM&gt;helps&lt;/EM&gt;&lt;/STRONG&gt;, then please consider &lt;STRONG&gt;&lt;EM&gt;Accept it as the solution &lt;/EM&gt;&lt;/STRONG&gt; to help the other members find it more quickly.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 29 Apr 2024 06:54:01 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Grouped-line-chart-that-shows-count-per-month/m-p/3874384#M151327</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-04-29T06:54:01Z</dc:date>
    </item>
  </channel>
</rss>

