<?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: Create a measure that counts values where a condition complies between columns of 2 tables. in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Create-a-measure-that-counts-values-where-a-condition-complies/m-p/841747#M6403</link>
    <description>&lt;P&gt;Hi&amp;nbsp;@&lt;SPAN&gt;Nathaniel,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thanks for the answer, probably I didn't explain my self properly.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;You picked the min and max values on TableB and use them to filter all values on tableA.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;What I want to do is apply a filter in row 1 of TableA depending of the value on TableB using the ID that is the field used to join both tables in the model.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Table A&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; TableB&lt;/P&gt;&lt;P&gt;DateA&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;ID&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;DateB&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/P&gt;&lt;P&gt;2017-03-02&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;SPAN&gt;2017-03-01&amp;nbsp; &amp;nbsp;is DateA between DateB and DateB+1day?&amp;nbsp; YES&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;2018-06-03&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;2&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;SPAN&gt;2018-06-03&amp;nbsp; &amp;nbsp;is DateA between DateB and DateB+1day? YES&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;2019-05-13&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;3&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;SPAN&gt;2014-05-28&amp;nbsp; &amp;nbsp;is DateA between DateB and DateB+1day? NO&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;2017-08-23&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;4&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;SPAN&gt;&amp;nbsp; 2015-08-23&amp;nbsp; &amp;nbsp;is DateA between DateB and DateB+1day? NO&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;So the result of the count of rows, in this case, should be 2 (for Id=1 and Id=2)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;JAVI&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sun, 10 Nov 2019 15:19:08 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2019-11-10T15:19:08Z</dc:date>
    <item>
      <title>Create a measure that counts values where a condition complies between columns of 2 tables.</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Create-a-measure-that-counts-values-where-a-condition-complies/m-p/841612#M6391</link>
      <description>&lt;P&gt;Hi all.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have two tables A and B joined by an ID.&lt;/P&gt;&lt;P&gt;On each of the tables, there is a date column.&lt;/P&gt;&lt;P&gt;I'm trying to create a measure that counts the number of rows in which the date of table A is between the date in table B and the date in table B +1 day.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Table A&lt;/P&gt;&lt;P&gt;ID&amp;nbsp; &amp;nbsp; DateA&lt;/P&gt;&lt;P&gt;1&amp;nbsp; &amp;nbsp; &amp;nbsp; 2017-03-02&lt;/P&gt;&lt;P&gt;2&amp;nbsp; &amp;nbsp; &amp;nbsp; 2018-06-03&lt;/P&gt;&lt;P&gt;3&amp;nbsp; &amp;nbsp; &amp;nbsp; 2019-05-13&lt;/P&gt;&lt;P&gt;4&amp;nbsp; &amp;nbsp; &amp;nbsp; 2017-08-23&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Table B&lt;/P&gt;&lt;P&gt;ID&amp;nbsp; &amp;nbsp; DateB&lt;/P&gt;&lt;P&gt;1&amp;nbsp; &amp;nbsp; &amp;nbsp; 2017-03-01&lt;/P&gt;&lt;P&gt;2&amp;nbsp; &amp;nbsp; &amp;nbsp; 2018-06-03&lt;/P&gt;&lt;P&gt;3&amp;nbsp; &amp;nbsp; &amp;nbsp; 2014-05-28&lt;/P&gt;&lt;P&gt;4&amp;nbsp; &amp;nbsp; &amp;nbsp; 2015-08-23&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In this case, Id 1 and 2 have dates that comply with the condition, so the expected value of the measure should be 2.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance&lt;/P&gt;</description>
      <pubDate>Sat, 09 Nov 2019 19:31:03 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Create-a-measure-that-counts-values-where-a-condition-complies/m-p/841612#M6391</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-11-09T19:31:03Z</dc:date>
    </item>
    <item>
      <title>Re: Create a measure that counts values where a condition complies between columns of 2 tables.</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Create-a-measure-that-counts-values-where-a-condition-complies/m-p/841670#M6399</link>
      <description>&lt;P&gt;Hi&amp;nbsp;Anonymous&lt;/LI-USER&gt;&amp;nbsp;,&lt;BR /&gt;I believe it is 1 and 4 IDs that work.&amp;nbsp; The largest value in table B is&amp;nbsp; 2018 6 3, so ID 2 3 in table A are over the limit for the upper value. The first measure works on a table, but to show it on a card it took a calculated column and the second measure.&lt;BR /&gt;&lt;BR /&gt;Let me know if you have any questions.&lt;BR /&gt;&lt;BR /&gt;If this solves your issues, please mark it as the &lt;STRONG&gt;solution, &lt;/STRONG&gt;so that others can find it easily. &lt;STRONG&gt;Kudos &lt;/STRONG&gt;&lt;span class="lia-unicode-emoji" title=":thumbs_up:"&gt;👍&lt;/span&gt;are nice too.&lt;BR /&gt;Nathaniel&lt;BR /&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;A measure:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Between Dates = 
Var _curDate = MAX(TableA[Date])

var _calcMinDate = Calculate(MAX(TableB[Date]),ALLEXCEPT(TableB,TableB[Date]),TableB[Date]&amp;lt;_curDate)
var  _calcMaxDate = Calculate(Min(TableB[Date]),ALLEXCEPT(TableB,TableB[Date]),TableB[Date]&amp;gt;_curDate)

var _calc = CALCULATE([Countrows TA],FILTER(TableA,_curDate&amp;gt;_calcMinDate &amp;amp;&amp;amp; _curDate&amp;lt;_calcMaxDate))
return

_calc&lt;/LI-CODE&gt;&lt;P&gt;A Calculated Column:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Between = 
Var _curDate = (TableA[Date])

var _calcMinDate = Calculate(MAX(TableB[Date]),ALLEXCEPT(TableB,TableB[Date]),TableB[Date]&amp;lt;_curDate)
var  _calcMaxDate = Calculate(Min(TableB[Date]),ALLEXCEPT(TableB,TableB[Date]),TableB[Date]&amp;gt;_curDate)

var _calc = CALCULATE(MIN(TableA[ID]),FILTER(TableA,_curDate&amp;gt;_calcMinDate &amp;amp;&amp;amp; _curDate&amp;lt;_calcMaxDate))
return

_calc&lt;/LI-CODE&gt;&lt;P&gt;A measure to display the Calculated Column on a card.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Sum of rows = CALCULATE(COUNTROWS(TableA),TableA[Between]&amp;lt;&amp;gt;BLANK())&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 10 Nov 2019 03:34:04 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Create-a-measure-that-counts-values-where-a-condition-complies/m-p/841670#M6399</guid>
      <dc:creator>Nathaniel_C</dc:creator>
      <dc:date>2019-11-10T03:34:04Z</dc:date>
    </item>
    <item>
      <title>Re: Create a measure that counts values where a condition complies between columns of 2 tables.</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Create-a-measure-that-counts-values-where-a-condition-complies/m-p/841695#M6401</link>
      <description>&lt;P&gt;Hi Nathaniel,&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for the answer, probably I didn't explain myself properly.&lt;/P&gt;&lt;P&gt;You took the max and min date values of table B and counted all the values from table A in which the date is between those values.&lt;/P&gt;&lt;P&gt;What I want is to apply the condition on every row given that both tables are joined in the model by the ID.&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;i.e&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Table A&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Table&amp;nbsp; B&lt;/P&gt;&lt;P&gt;DateA&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;ID&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; DateB&lt;/P&gt;&lt;P&gt;2017-03-02&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;SPAN&gt;2017-03-01&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; is DateA&lt;/SPAN&gt;&amp;nbsp;between DateB and DateB+1day?&amp;nbsp; &amp;nbsp;YES&lt;/P&gt;&lt;P&gt;2018-06-03&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;2&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;SPAN&gt;2018-06-03&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;is DateA&amp;nbsp;between DateB and DateB+1day?&amp;nbsp; &amp;nbsp;YES&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;2019-05-13&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;3&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;SPAN&gt;2014-05-28&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;is DateA&amp;nbsp;between DateB and DateB+1day?&amp;nbsp; &amp;nbsp;NO&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;2017-08-23&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;4&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;SPAN&gt;2015-08-23&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;is DateA&amp;nbsp;between DateB and DateB+1day?&amp;nbsp; &amp;nbsp;NO&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;So the measure should return a Value=2, that belongs to Ids 1 and 2.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I hope this way is better explained.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thanks for helping anyway.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 10 Nov 2019 09:57:57 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Create-a-measure-that-counts-values-where-a-condition-complies/m-p/841695#M6401</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-11-10T09:57:57Z</dc:date>
    </item>
    <item>
      <title>Re: Create a measure that counts values where a condition complies between columns of 2 tables.</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Create-a-measure-that-counts-values-where-a-condition-complies/m-p/841747#M6403</link>
      <description>&lt;P&gt;Hi&amp;nbsp;@&lt;SPAN&gt;Nathaniel,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thanks for the answer, probably I didn't explain my self properly.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;You picked the min and max values on TableB and use them to filter all values on tableA.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;What I want to do is apply a filter in row 1 of TableA depending of the value on TableB using the ID that is the field used to join both tables in the model.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Table A&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; TableB&lt;/P&gt;&lt;P&gt;DateA&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;ID&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;DateB&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/P&gt;&lt;P&gt;2017-03-02&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;SPAN&gt;2017-03-01&amp;nbsp; &amp;nbsp;is DateA between DateB and DateB+1day?&amp;nbsp; YES&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;2018-06-03&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;2&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;SPAN&gt;2018-06-03&amp;nbsp; &amp;nbsp;is DateA between DateB and DateB+1day? YES&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;2019-05-13&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;3&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;SPAN&gt;2014-05-28&amp;nbsp; &amp;nbsp;is DateA between DateB and DateB+1day? NO&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;2017-08-23&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;4&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;SPAN&gt;&amp;nbsp; 2015-08-23&amp;nbsp; &amp;nbsp;is DateA between DateB and DateB+1day? NO&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;So the result of the count of rows, in this case, should be 2 (for Id=1 and Id=2)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;JAVI&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 10 Nov 2019 15:19:08 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Create-a-measure-that-counts-values-where-a-condition-complies/m-p/841747#M6403</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-11-10T15:19:08Z</dc:date>
    </item>
    <item>
      <title>Re: Create a measure that counts values where a condition complies between columns of 2 tables.</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Create-a-measure-that-counts-values-where-a-condition-complies/m-p/841769#M6404</link>
      <description>&lt;P&gt;Hi&amp;nbsp;Anonymous&lt;/LI-USER&gt;&amp;nbsp;&lt;BR /&gt;&lt;SPAN&gt;2018-06-03&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;2&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;2018-06-03&amp;nbsp; &amp;nbsp;is DateA between DateB and DateB+1day? YES&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;So which two date is DateA between on table B?&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Nathaniel&lt;/P&gt;</description>
      <pubDate>Sun, 10 Nov 2019 16:31:54 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Create-a-measure-that-counts-values-where-a-condition-complies/m-p/841769#M6404</guid>
      <dc:creator>Nathaniel_C</dc:creator>
      <dc:date>2019-11-10T16:31:54Z</dc:date>
    </item>
    <item>
      <title>Re: Create a measure that counts values where a condition complies between columns of 2 tables.</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Create-a-measure-that-counts-values-where-a-condition-complies/m-p/841770#M6405</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="159166" data-lia-user-login="Nathaniel_C" class="lia-mention lia-mention-user"&gt;Nathaniel_C&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Table A&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; TableB&lt;/P&gt;&lt;P&gt;DateA&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;ID&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;DateB&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/P&gt;&lt;P&gt;2017-03-02&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;SPAN&gt;2017-03-01&amp;nbsp; &amp;nbsp;is DateA between DateB and DateB+1day?&amp;nbsp; YES&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;2017-03-02(DateA) is between&amp;nbsp;2017-03-01 (DateB) and 2017-03-02(DateB +1)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Between includes the values.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Javi&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 10 Nov 2019 16:44:46 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Create-a-measure-that-counts-values-where-a-condition-complies/m-p/841770#M6405</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-11-10T16:44:46Z</dc:date>
    </item>
    <item>
      <title>Re: Create a measure that counts values where a condition complies between columns of 2 tables.</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Create-a-measure-that-counts-values-where-a-condition-complies/m-p/841778#M6406</link>
      <description>&lt;P&gt;Hi&amp;nbsp;Anonymous&lt;/a&gt;&amp;nbsp;,&lt;BR /&gt;So another way to say this is the date in table A for each ID must look at the same ID in table B, and be equal to the date in Table B, or Table B+1 for a yes. So it must match one of two dates only.&lt;BR /&gt;Nathaniel&lt;/P&gt;</description>
      <pubDate>Sun, 10 Nov 2019 17:00:44 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Create-a-measure-that-counts-values-where-a-condition-complies/m-p/841778#M6406</guid>
      <dc:creator>Nathaniel_C</dc:creator>
      <dc:date>2019-11-10T17:00:44Z</dc:date>
    </item>
    <item>
      <title>Re: Create a measure that counts values where a condition complies between columns of 2 tables.</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Create-a-measure-that-counts-values-where-a-condition-complies/m-p/841780#M6407</link>
      <description>&lt;P&gt;Yes, that's more or less what I need but instead of "&lt;SPAN&gt;So it must match one of two dates only", the date A must be between the period.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;In the example the condition is:&lt;/SPAN&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;SPAN&gt;DateA between DateB and DateB+1day&lt;/SPAN&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;SPAN&gt;but it can also be:&lt;/SPAN&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;SPAN&gt;DateA between DateB and DateB+7day&lt;/SPAN&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;SPAN&gt;So in this second case, the row must be counted is DateA is in any of the days od the period.&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;&lt;P&gt;&lt;SPAN&gt;Javi&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 10 Nov 2019 17:10:48 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Create-a-measure-that-counts-values-where-a-condition-complies/m-p/841780#M6407</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-11-10T17:10:48Z</dc:date>
    </item>
    <item>
      <title>Re: Create a measure that counts values where a condition complies between columns of 2 tables.</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Create-a-measure-that-counts-values-where-a-condition-complies/m-p/841792#M6408</link>
      <description>&lt;P&gt;Hi&amp;nbsp;Anonymous&lt;/a&gt;&amp;nbsp;,&lt;BR /&gt;I believe this is what you are looking for in the outcome.&lt;BR /&gt;Let me know if you have any questions.&lt;BR /&gt;&lt;BR /&gt;If this solves your issues, please mark it as the &lt;STRONG&gt;solution, &lt;/STRONG&gt;so that others can find it easily. &lt;STRONG&gt;Kudos &lt;/STRONG&gt;&lt;span class="lia-unicode-emoji" title=":thumbs_up:"&gt;👍&lt;/span&gt;are nice too.&lt;BR /&gt;Nathaniel&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Calculated Column&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Between =
VAR _curDate = ( TableA[Date] )
VAR _curID = TableA[ID]
VAR _curTableBDate =
    CALCULATE ( MAX ( TableB[Date] ), FILTER ( TableB, TableB[ID] = _curID ) )
VAR _maxPerDate = _curTableBDate + 1
RETURN
    IF ( _curDate &amp;gt;= _curTableBDate &amp;amp;&amp;amp; _curDate &amp;lt;= _maxPerDate, "Yes", "No" )&lt;/LI-CODE&gt;&lt;P&gt;Measure for table in picture.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Between Dates2 =
VAR _curDate =
    MAX ( TableA[Date] )
VAR _curID =
    MAX ( TableA[ID] )
VAR _curTableBDate =
    CALCULATE ( MAX ( TableB[Date] ), FILTER ( TableB, TableB[ID] = _curID ) )
VAR _maxPerDate = _curTableBDate + 1
RETURN
    IF ( _curDate &amp;gt;= _curTableBDate &amp;amp;&amp;amp; _curDate &amp;lt;= _maxPerDate, "Yes", "No" )&lt;/LI-CODE&gt;&lt;P&gt;Measure for Card in picture.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Sum of rows = CALCULATE(COUNTROWS(TableA),TableA[Between]="Yes")&lt;/LI-CODE&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 10 Nov 2019 17:45:45 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Create-a-measure-that-counts-values-where-a-condition-complies/m-p/841792#M6408</guid>
      <dc:creator>Nathaniel_C</dc:creator>
      <dc:date>2019-11-10T17:45:45Z</dc:date>
    </item>
    <item>
      <title>Re: Create a measure that counts values where a condition complies between columns of 2 tables.</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Create-a-measure-that-counts-values-where-a-condition-complies/m-p/841804#M6410</link>
      <description>&lt;P&gt;Thanks a lot&amp;nbsp;&lt;A title="" href="https://community.powerbi.com/t5/user/viewprofilepage/user-id/159166" target="_self"&gt;&lt;SPAN class=""&gt;Nathaniel_C&lt;/SPAN&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;That was exactly what I was looking for.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-unicode-emoji" title=":grinning_face:"&gt;😀&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 10 Nov 2019 19:35:37 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Create-a-measure-that-counts-values-where-a-condition-complies/m-p/841804#M6410</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-11-10T19:35:37Z</dc:date>
    </item>
    <item>
      <title>Re: Create a measure that counts values where a condition complies between columns of 2 tables.</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Create-a-measure-that-counts-values-where-a-condition-complies/m-p/841807#M6411</link>
      <description>&lt;P&gt;Hello, Anonymous&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;You are welcome! Glad we could get the logic straight.&lt;BR /&gt;You could create a variable and replace the 1 with it. Then it would be easy to change that at the beginning of the code to 7 or whatever.&lt;BR /&gt;Nathaniel&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 10 Nov 2019 20:00:03 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Create-a-measure-that-counts-values-where-a-condition-complies/m-p/841807#M6411</guid>
      <dc:creator>Nathaniel_C</dc:creator>
      <dc:date>2019-11-10T20:00:03Z</dc:date>
    </item>
  </channel>
</rss>

