<?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: Filtering data between two columns from different tables in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filtering-data-between-two-columns-from-different-tables/m-p/3992343#M154952</link>
    <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="759803" data-lia-user-login="Jazzed2b" class="lia-mention lia-mention-user"&gt;Jazzed2b&lt;/a&gt; , as they have on to many relation&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;a new column in diver report table&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;=&amp;nbsp; datediff(related('AL Policy Data'[Effective Date]), 'Diver Data'[deleted date], date)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;refer 4 ways (related, relatedtable, lookupvalue, sumx/minx/maxx with filter) to copy data from one table to another&lt;BR /&gt;&lt;A href="https://www.youtube.com/watch?v=Wu1mWxR23jU" target="_blank" rel="noopener"&gt;https://www.youtube.com/watch?v=Wu1mWxR23jU&lt;/A&gt;&lt;BR /&gt;&lt;A href="https://www.youtube.com/watch?v=czNHt7UXIe8" target="_blank" rel="noopener"&gt;https://www.youtube.com/watch?v=czNHt7UXIe8&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 14 Jun 2024 03:16:56 GMT</pubDate>
    <dc:creator>amitchandak</dc:creator>
    <dc:date>2024-06-14T03:16:56Z</dc:date>
    <item>
      <title>Filtering data between two columns from different tables</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filtering-data-between-two-columns-from-different-tables/m-p/3991976#M154919</link>
      <description>&lt;P&gt;I have two tables with a ONE to MANY relationship via POLICY NUMBER.&amp;nbsp; On the ONE table I have a column POLICY EFFECTIVE DATES and on the MANY table I have multiple drivers identified on a DELETEDATE.&amp;nbsp; I want to filter to count only the number of drivers where the difference betwen POLICY EFFECTIVE DATES and DELETEDATE are less than 365.&amp;nbsp; The reason being that when a policy expires after one year (365) they are all marked with a DELETEDATE 365 days after the POLICY EFFECTIVE DATE.&amp;nbsp; I only want to cound the number of drivers which are deleted before the policy expires at 365.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is a sample of the table relationships.&amp;nbsp; I have tried filtering the data based on the relationships, but I do not know if Power BI can subtract the DELETEDATE from the POLICY EFFECTIVE DATE as a condition prior to filter and summing the remaining driver.&amp;nbsp; Is this something better accomplished as a query on Access DB and then loading the data in Power BI or is there a formula in Power BI to compare the dates on these two columns and then summing the drivers which qualify (meaning having a DELETEDATE less than 365 days from the POLICY EFFECTIVE DATE)?&amp;nbsp;&lt;img /&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 14 Jun 2024 00:05:47 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filtering-data-between-two-columns-from-different-tables/m-p/3991976#M154919</guid>
      <dc:creator>Jazzed2b</dc:creator>
      <dc:date>2024-06-14T00:05:47Z</dc:date>
    </item>
    <item>
      <title>Re: Filtering data between two columns from different tables</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filtering-data-between-two-columns-from-different-tables/m-p/3992343#M154952</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="759803" data-lia-user-login="Jazzed2b" class="lia-mention lia-mention-user"&gt;Jazzed2b&lt;/a&gt; , as they have on to many relation&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;a new column in diver report table&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;=&amp;nbsp; datediff(related('AL Policy Data'[Effective Date]), 'Diver Data'[deleted date], date)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;refer 4 ways (related, relatedtable, lookupvalue, sumx/minx/maxx with filter) to copy data from one table to another&lt;BR /&gt;&lt;A href="https://www.youtube.com/watch?v=Wu1mWxR23jU" target="_blank" rel="noopener"&gt;https://www.youtube.com/watch?v=Wu1mWxR23jU&lt;/A&gt;&lt;BR /&gt;&lt;A href="https://www.youtube.com/watch?v=czNHt7UXIe8" target="_blank" rel="noopener"&gt;https://www.youtube.com/watch?v=czNHt7UXIe8&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 14 Jun 2024 03:16:56 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filtering-data-between-two-columns-from-different-tables/m-p/3992343#M154952</guid>
      <dc:creator>amitchandak</dc:creator>
      <dc:date>2024-06-14T03:16:56Z</dc:date>
    </item>
    <item>
      <title>Re: Filtering data between two columns from different tables</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filtering-data-between-two-columns-from-different-tables/m-p/3992669#M154973</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="759803" data-lia-user-login="Jazzed2b" class="lia-mention lia-mention-user"&gt;Jazzed2b&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can try it by following steps:&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;1.you can create a calculated column to compute the difference in days&lt;/SPAN&gt;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;DaysDifference = DATEDIFF(RELATED(AL Policy Data[EFFECTIVE DATE]), Driver Report[DELETEDATE], DAY)&lt;/LI-CODE&gt;
&lt;P&gt;2.&lt;SPAN&gt;you can easily filter this table to include only the rows where&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;is less than 365 and then count the number of drivers. This can be done by creating a measure&lt;/SPAN&gt;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;DriversCount = COUNTROWS(FILTER(Driver Report,Driver Report[DaysDifference] &amp;lt; 365))&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Hope it helps!&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best regards,&lt;BR /&gt;Community Support Team_ Scott Chang&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If this post helps then please consider&amp;nbsp;&lt;STRONG&gt;Accept it as the solution&lt;/STRONG&gt;&amp;nbsp;to help the other members find it more quickly.&lt;/P&gt;
&lt;P&gt;&lt;LI-WRAPPER&gt;&lt;/LI-WRAPPER&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 14 Jun 2024 06:44:29 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filtering-data-between-two-columns-from-different-tables/m-p/3992669#M154973</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-06-14T06:44:29Z</dc:date>
    </item>
  </channel>
</rss>

