<?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: Calculate the count of customers for last 30 days! in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-the-count-of-customers-for-last-30-days/m-p/1505437#M29175</link>
    <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="163058" data-lia-user-login="Nimai123" class="lia-mention lia-mention-user"&gt;Nimai123&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It's NOT the same logic by any means.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;DATEADD moves the given set of dates by a specified interval.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;To get the same logic you have to use DATESINPERIOD with the correct arguments. (Just to stress this point as well: Time-intel functions work correctly ONLY with proper date tables. You can't use them on columns of fact tables).&lt;/P&gt;</description>
    <pubDate>Thu, 19 Nov 2020 16:12:43 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2020-11-19T16:12:43Z</dc:date>
    <item>
      <title>Calculate the count of customers for last 30 days!</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-the-count-of-customers-for-last-30-days/m-p/1504297#M29134</link>
      <description>&lt;P&gt;I tried to use the below DAX but got an error because my Date column was not continious,&amp;nbsp;so i created a date &lt;STRONG&gt;Table&lt;/STRONG&gt; and joined with my non-continious date column.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;STRONG&gt;Last 30 Days = CALCULATE(COUNT(tbl_logs[userprincipalname]),DATEADD('Table'[Date],-30,DAY))&lt;/STRONG&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;And then i used a different measure with the same logic and the asnwer was differet, where did i go wrong ( got correct for few users)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;STRONG&gt;Measure = CALCULATE(COUNT(tbl_logs[userprincipalname]),FILTER(ALL('Table'),'Table'[Date] &amp;gt;= TODAY()-30))&lt;/STRONG&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there a better way to calculate the count for last 30 days for an uncontinious date column.?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="148838" data-lia-user-login="amitchandak" class="lia-mention lia-mention-user"&gt;amitchandak&lt;/a&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 19 Nov 2020 09:09:21 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-the-count-of-customers-for-last-30-days/m-p/1504297#M29134</guid>
      <dc:creator>Nimai123</dc:creator>
      <dc:date>2020-11-19T09:09:21Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate the count of customers for last 30 days!</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-the-count-of-customers-for-last-30-days/m-p/1504342#M29137</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="163058" data-lia-user-login="Nimai123" class="lia-mention lia-mention-user"&gt;Nimai123&lt;/a&gt; , Table is date table with all continuous dates?&lt;/P&gt;
&lt;P&gt;Ideally, you should date table&lt;/P&gt;</description>
      <pubDate>Thu, 19 Nov 2020 09:20:41 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-the-count-of-customers-for-last-30-days/m-p/1504342#M29137</guid>
      <dc:creator>amitchandak</dc:creator>
      <dc:date>2020-11-19T09:20:41Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate the count of customers for last 30 days!</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-the-count-of-customers-for-last-30-days/m-p/1504409#M29141</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="148838" data-lia-user-login="amitchandak" class="lia-mention lia-mention-user"&gt;amitchandak&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Yes the table is a date table that i have created and the &lt;STRONG&gt;Measure = CALCULATE(COUNT(tbl_logs[userprincipalname]),FILTER(ALL('Table'),'Table'[Date] &amp;gt;= TODAY()-30))&amp;nbsp;&lt;/STRONG&gt;is working properly, but why the Last 30 days Measure is not working as desired dispite of the same logic used.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can we calculate without using the Date table but just the un-continious date column?&lt;/P&gt;</description>
      <pubDate>Thu, 19 Nov 2020 09:43:15 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-the-count-of-customers-for-last-30-days/m-p/1504409#M29141</guid>
      <dc:creator>Nimai123</dc:creator>
      <dc:date>2020-11-19T09:43:15Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate the count of customers for last 30 days!</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-the-count-of-customers-for-last-30-days/m-p/1504509#M29146</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="163058" data-lia-user-login="Nimai123" class="lia-mention lia-mention-user"&gt;Nimai123&lt;/a&gt; , You are not taking any date on the page or in a visual form where dateadd will get the date?&lt;/P&gt;</description>
      <pubDate>Thu, 19 Nov 2020 10:13:39 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-the-count-of-customers-for-last-30-days/m-p/1504509#M29146</guid>
      <dc:creator>amitchandak</dc:creator>
      <dc:date>2020-11-19T10:13:39Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate the count of customers for last 30 days!</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-the-count-of-customers-for-last-30-days/m-p/1505190#M29157</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="148838" data-lia-user-login="amitchandak" class="lia-mention lia-mention-user"&gt;amitchandak&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to calculate the top 5 count of the users for the last 15 days, 30 days, 45 days, 60 days,... and display it in a graph, i am able to show all the details together.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But not albe to show the top 5 for the last 15 days, 30 days, 45 days and 60 days.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When i create a switch statement, i get the answers right but it doesnt sums up logically, as when i select 30 days it gives me the value without taking the sum of 15 days.&lt;/P&gt;</description>
      <pubDate>Thu, 19 Nov 2020 14:37:20 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-the-count-of-customers-for-last-30-days/m-p/1505190#M29157</guid>
      <dc:creator>Nimai123</dc:creator>
      <dc:date>2020-11-19T14:37:20Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate the count of customers for last 30 days!</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-the-count-of-customers-for-last-30-days/m-p/1505437#M29175</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="163058" data-lia-user-login="Nimai123" class="lia-mention lia-mention-user"&gt;Nimai123&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It's NOT the same logic by any means.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;DATEADD moves the given set of dates by a specified interval.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;To get the same logic you have to use DATESINPERIOD with the correct arguments. (Just to stress this point as well: Time-intel functions work correctly ONLY with proper date tables. You can't use them on columns of fact tables).&lt;/P&gt;</description>
      <pubDate>Thu, 19 Nov 2020 16:12:43 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-the-count-of-customers-for-last-30-days/m-p/1505437#M29175</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-11-19T16:12:43Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate the count of customers for last 30 days!</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-the-count-of-customers-for-last-30-days/m-p/1506190#M29204</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="163058" data-lia-user-login="Nimai123" class="lia-mention lia-mention-user"&gt;Nimai123&lt;/a&gt; , For this bucketing you need to create a column in you table by subracting from today &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Diff = datediff([Date], today(),Day)&lt;/P&gt;
&lt;P&gt;Now create a bucket&lt;/P&gt;
&lt;P&gt;Switch (True()&lt;/P&gt;
&lt;P&gt;[Diff] &amp;lt;15&amp;nbsp; , "Last 15 Days ",&lt;/P&gt;
&lt;P&gt;[Diff] &amp;lt;30&amp;nbsp; , "Last 15 to 30 Day Days "s&lt;/P&gt;
&lt;P&gt;//Add others ,&lt;/P&gt;
&lt;P&gt;)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In case you need 30days to overlap 15 days, then you need to create measures&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 20 Nov 2020 02:38:43 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-the-count-of-customers-for-last-30-days/m-p/1506190#M29204</guid>
      <dc:creator>amitchandak</dc:creator>
      <dc:date>2020-11-20T02:38:43Z</dc:date>
    </item>
  </channel>
</rss>

