<?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: Count of records for specific date range/ refer cells for value in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-of-records-for-specific-date-range-refer-cells-for-value/m-p/758959#M3121</link>
    <description>Mate, your explanation is highly obscure. If you don't give us a VERY CLEAR explanation of what it is you want to do and the model, please do not be surprised if you don't get any answers.&lt;BR /&gt;&lt;BR /&gt;I'd suggest you read this:&lt;BR /&gt;&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;&lt;BR /&gt;Best&lt;BR /&gt;Darek</description>
    <pubDate>Tue, 06 Aug 2019 11:01:50 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2019-08-06T11:01:50Z</dc:date>
    <item>
      <title>Count of records for specific date range/ refer cells for value</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-of-records-for-specific-date-range-refer-cells-for-value/m-p/758241#M3101</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to count the records for a specific date range. I have two tables&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;table 1: has count of records for every category by date&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;the date column has records from the year 2017. to visualise for a particular week, i have applied basic filtering where i&amp;nbsp; have manually selected these above shown dates.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;table 2: has count of category by total and total before this week[previous]&lt;BR /&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;inorder to display count of previous i want to write a dax that subtracts the count of a particular week from the total count of category.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;the problem i am facing is, i dont want to give the dates in the dax, i want to automate where it automatically takes a specific date range to count the records. example, every previous week monday to friday is my default week setting. Please suggest me ways to do the same.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;or, i wish to refer to a cell to use that value. Please let me know if this is possible.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for your help!!&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;</description>
      <pubDate>Mon, 05 Aug 2019 21:02:41 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-of-records-for-specific-date-range-refer-cells-for-value/m-p/758241#M3101</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-08-05T21:02:41Z</dc:date>
    </item>
    <item>
      <title>Re: Count of records for specific date range/ refer cells for value</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-of-records-for-specific-date-range-refer-cells-for-value/m-p/758670#M3106</link>
      <description>&lt;P&gt;Hi&amp;nbsp;Anonymous&lt;/LI-USER&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please can you provide a data sample and the desired outcome?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;Best Regards,&lt;BR /&gt;Mariusz&lt;BR /&gt;&lt;BR /&gt;Please feel free to connect with me.&lt;BR /&gt;&lt;A href="https://www.linkedin.com/in/mariusz-repczynski-065a7362/" rel="nofollow noopener noreferrer" target="_blank"&gt;&lt;IMG src="https://ip1.i.lithium.com/1232d707bb27fc4afa3b81cd0702c478b6f7aced/68747470733a2f2f7374617469632e6c6963646e2e636f6d2f736364732f636f6d6d6f6e2f752f696d616765732f6c6f676f732f6c696e6b6564696e2f6c6f676f5f6c696e6b6564696e5f39337832315f76322e706e67" border="0" alt="Mariusz Repczynski" /&gt;&lt;/A&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 06 Aug 2019 07:42:30 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-of-records-for-specific-date-range-refer-cells-for-value/m-p/758670#M3106</guid>
      <dc:creator>Mariusz</dc:creator>
      <dc:date>2019-08-06T07:42:30Z</dc:date>
    </item>
    <item>
      <title>Re: Count of records for specific date range/ refer cells for value</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-of-records-for-specific-date-range-refer-cells-for-value/m-p/758959#M3121</link>
      <description>Mate, your explanation is highly obscure. If you don't give us a VERY CLEAR explanation of what it is you want to do and the model, please do not be surprised if you don't get any answers.&lt;BR /&gt;&lt;BR /&gt;I'd suggest you read this:&lt;BR /&gt;&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;&lt;BR /&gt;Best&lt;BR /&gt;Darek</description>
      <pubDate>Tue, 06 Aug 2019 11:01:50 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-of-records-for-specific-date-range-refer-cells-for-value/m-p/758959#M3121</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-08-06T11:01:50Z</dc:date>
    </item>
    <item>
      <title>Re: Count of records for specific date range/ refer cells for value</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-of-records-for-specific-date-range-refer-cells-for-value/m-p/759185#M3127</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="81408" data-lia-user-login="Mariusz" class="lia-mention lia-mention-user"&gt;Mariusz&lt;/a&gt;,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://1drv.ms/u/s!Ap-4rMiqmKwTgYMY1_fild0kj79ncw?e=AzIilD&amp;nbsp;" target="_blank" rel="noopener"&gt;https://1drv.ms/u/s!Ap-4rMiqmKwTgYMY1_fild0kj79ncw?e=AzIilD&amp;nbsp;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have uploaded a sample file in this link. Please view this. In table 2 of the pbi file, you will find a new measure called count of previous category where i am trying to count all records before a certain week period.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Currently i have used&amp;nbsp;&lt;/P&gt;&lt;P&gt;count of previous =&amp;nbsp;&lt;SPAN&gt;CALCULATE( COUNT(category[Category]), category[created date] &amp;lt; DATE(2019, 7, 22))&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;instead of the above formula, i want to refer to table 1 to get the date's value for every category and subtract it from total.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;count of previous category = total count of records - count of records for dates shown in table 1&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;in excel i used this formula :&amp;nbsp;&lt;/P&gt;&lt;P&gt;=COUNTIFS(' Data'!$C:$C,'Report 1'!$A8)-SUM(C8:I8)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;where sum(c8:18) used to contain value for categories for various dates.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please suggest ways to do the same.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 06 Aug 2019 14:21:23 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-of-records-for-specific-date-range-refer-cells-for-value/m-p/759185#M3127</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-08-06T14:21:23Z</dc:date>
    </item>
  </channel>
</rss>

