<?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 Challenge Creating Cumulative Chart in Power BI with Distinct Token Count in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Challenge-Creating-Cumulative-Chart-in-Power-BI-with-Distinct/m-p/3711098#M144389</link>
    <description>&lt;P&gt;In a table named 'token_ativos' with a column named 'created_at' for dates and a 'token_id' column containing the IDs of active tokens, where the 'created_at' column represents the creation date of the active tokens. In Power BI, I need to create a chart that provides the sum of active tokens for each month. For example, if there were 2 active tokens in February and 2 more were created in March, the chart should display 2 for February and 4 for March. Please create a DAX expression that gives me this cumulative total when placed on the X-axis with 'created_at'.&lt;BR /&gt;&lt;BR /&gt;When I place the distinct count of 'token_id' on the Y-axis and 'created_at' on the X-axis, the chart only returns the count of tokens created each month. I need the cumulative count instead.&lt;/P&gt;</description>
    <pubDate>Tue, 20 Feb 2024 13:06:20 GMT</pubDate>
    <dc:creator>marquesjef</dc:creator>
    <dc:date>2024-02-20T13:06:20Z</dc:date>
    <item>
      <title>Challenge Creating Cumulative Chart in Power BI with Distinct Token Count</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Challenge-Creating-Cumulative-Chart-in-Power-BI-with-Distinct/m-p/3711098#M144389</link>
      <description>&lt;P&gt;In a table named 'token_ativos' with a column named 'created_at' for dates and a 'token_id' column containing the IDs of active tokens, where the 'created_at' column represents the creation date of the active tokens. In Power BI, I need to create a chart that provides the sum of active tokens for each month. For example, if there were 2 active tokens in February and 2 more were created in March, the chart should display 2 for February and 4 for March. Please create a DAX expression that gives me this cumulative total when placed on the X-axis with 'created_at'.&lt;BR /&gt;&lt;BR /&gt;When I place the distinct count of 'token_id' on the Y-axis and 'created_at' on the X-axis, the chart only returns the count of tokens created each month. I need the cumulative count instead.&lt;/P&gt;</description>
      <pubDate>Tue, 20 Feb 2024 13:06:20 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Challenge-Creating-Cumulative-Chart-in-Power-BI-with-Distinct/m-p/3711098#M144389</guid>
      <dc:creator>marquesjef</dc:creator>
      <dc:date>2024-02-20T13:06:20Z</dc:date>
    </item>
    <item>
      <title>Re: Challenge Creating Cumulative Chart in Power BI with Distinct Token Count</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Challenge-Creating-Cumulative-Chart-in-Power-BI-with-Distinct/m-p/3711120#M144391</link>
      <description>&lt;P&gt;HI,&lt;BR /&gt;&lt;BR /&gt;I recommend checking out this article by SQLBI:&amp;nbsp;&lt;A href="https://www.sqlbi.com/articles/computing-running-totals-in-dax/" target="_blank"&gt;Computing running totals in DAX - SQLBI&lt;/A&gt;&lt;BR /&gt;Also in February Power BI udate visual calculations are now available in preview. Here is an example video about these:&amp;nbsp;&lt;A href="https://www.youtube.com/watch?v=URbuIs_k-Ag" target="_blank"&gt;Power BI Feb 2024 Update: Visual Calculations Walkthrough! - YouTube&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;As for your dax:&lt;BR /&gt;var _mdate = max(&lt;SPAN&gt;'Calendar'[date&lt;/SPAN&gt;)&lt;BR /&gt;return&lt;BR /&gt;CALCULATE(COUNT(&lt;SPAN&gt;'token_ativos'[&amp;nbsp;'token_id']), ALL('Calendar'),'Calendar'[date]&amp;lt;= _mdate)&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;This assumes ou have calendar table and relation between it and your fact table.&lt;BR /&gt;&lt;BR /&gt;Here is an alternative with YTD.&lt;BR /&gt;&lt;BR /&gt;CALCULATE(COUNT(&lt;SPAN&gt;'token_ativos'[&amp;nbsp;'token_id']),DATESYTD('Calendar'[date])).&lt;BR /&gt;&lt;BR /&gt;I hope this post helps to solve your issue and if it does consider accepting it as a solution and giving the post a thumbs up!&lt;BR /&gt;&lt;BR /&gt;My LinkedIn: &lt;A href="https://www.linkedin.com/in/n%C3%A4ttiahov-00001/" target="_blank"&gt;https://www.linkedin.com/in/n%C3%A4ttiahov-00001/&lt;/A&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 20 Feb 2024 13:19:57 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Challenge-Creating-Cumulative-Chart-in-Power-BI-with-Distinct/m-p/3711120#M144391</guid>
      <dc:creator>ValtteriN</dc:creator>
      <dc:date>2024-02-20T13:19:57Z</dc:date>
    </item>
    <item>
      <title>Re: Challenge Creating Cumulative Chart in Power BI with Distinct Token Count</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Challenge-Creating-Cumulative-Chart-in-Power-BI-with-Distinct/m-p/3713564#M144508</link>
      <description>&lt;P&gt;Hi &lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="692495" data-lia-user-login="marquesjef" class="lia-mention lia-mention-user"&gt;marquesjef&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hope everything is going well.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please follow these steps:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;1. This is the original data I created.&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;2. Create a measuring value, the DAX syntax is as follows:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Cumulative Total = 
CALCULATE(
    COUNTROWS('token_ativos'),
    FILTER(
        ALLSELECTED('token_ativos'),
        'token_ativos'[created_at] &amp;lt;= MAX('token_ativos'[created_at])
    )
)&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;3. Put the Created_at on the X-axis and Cumulative Total on the Y-axis.&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;At this point, you have realized your needs. If you have other questions, please contact me at any time.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The pbix file has been attached.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;BR /&gt;Yang&lt;BR /&gt;Community Support Team&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If there is any 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;&amp;nbsp;to help the other members find it more quickly.&lt;BR /&gt;If I misunderstand your needs or you still have problems on it, please feel free to let us know.&amp;nbsp;&lt;STRONG&gt;&lt;EM&gt;Thanks a lot!&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 21 Feb 2024 08:24:36 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Challenge-Creating-Cumulative-Chart-in-Power-BI-with-Distinct/m-p/3713564#M144508</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-02-21T08:24:36Z</dc:date>
    </item>
  </channel>
</rss>

