<?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: Iterate over two different columns/tables in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Iterate-over-two-different-columns-tables/m-p/4421404#M175539</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;Thank you for your response.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I would like to get the datedifference between two dates from different tables that are only "connected" via the facts table. The keys of their respective tables are not at the same granularity and as such can't be connected to each other.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;The measure will be used in a line chart detailing time period and should respond accordingly.&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>Fri, 21 Feb 2025 07:43:14 GMT</pubDate>
    <dc:creator>Silvard</dc:creator>
    <dc:date>2025-02-21T07:43:14Z</dc:date>
    <item>
      <title>Iterate over two different columns/tables</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Iterate-over-two-different-columns-tables/m-p/4420647#M175512</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The below measure is mostly producing the correct result, but given SQLBI recommend not to create calculated columns within summarize and instead use addcolumns to do so, I'm looking for a better solution.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Ive already tried their recommendation but unfortunately it creates the same max created date value across all rows and the iteration fails severely.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Essentially, I want to work out the date difference between the Created Date and the Assessment End within the context of current dates/period (eg, a line chart showing years)&lt;/P&gt;&lt;P&gt;These two columns do not share the same key and are both connected to the fact table.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Your help and input is much appreciated!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;Time = 
VAR FilteredAssessments = CALCULATETABLE(Assessments,Assessments[Assessment Step - Name] = "Condition1" &amp;amp;&amp;amp; MAX(Assessments[End]))

	VAR VirtualTable = 
	SUMMARIZE(FilteredAssessments,Assessments[Assessment Step ID],Assessments[End],"Created",CALCULATE(TRUNC(MAX(Jobs[Created])),TREATAS(VALUES(Facts[JobID]),Jobs[JobID]),USERELATIONSHIP(Jobs[Created],'Calendar'[Date])))
	
    RETURN
    AVERAGEX(VirtualTable,DATEDIFF([Created],TRUNC(Assessments[End]),DAY)))&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 20 Feb 2025 23:11:48 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Iterate-over-two-different-columns-tables/m-p/4420647#M175512</guid>
      <dc:creator>Silvard</dc:creator>
      <dc:date>2025-02-20T23:11:48Z</dc:date>
    </item>
    <item>
      <title>Re: Iterate over two different columns/tables</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Iterate-over-two-different-columns-tables/m-p/4421218#M175527</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="803517" data-lia-user-login="Silvard" class="lia-mention lia-mention-user"&gt;Silvard&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Based on your description, it's hard to figure out what you expect to achieve. You can share the pbix file without sensitive data and give your desired implementation.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P style="text-align: justify; text-justify: inter-ideograph;"&gt;&lt;SPAN&gt;Best Regards,&lt;BR /&gt;Yang&lt;/SPAN&gt;&lt;SPAN&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;Community Support Team&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 21 Feb 2025 06:27:42 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Iterate-over-two-different-columns-tables/m-p/4421218#M175527</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2025-02-21T06:27:42Z</dc:date>
    </item>
    <item>
      <title>Re: Iterate over two different columns/tables</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Iterate-over-two-different-columns-tables/m-p/4421404#M175539</link>
      <description>&lt;P&gt;Hi&amp;nbsp;Anonymous&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you for your response.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I would like to get the datedifference between two dates from different tables that are only "connected" via the facts table. The keys of their respective tables are not at the same granularity and as such can't be connected to each other.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;The measure will be used in a line chart detailing time period and should respond accordingly.&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>Fri, 21 Feb 2025 07:43:14 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Iterate-over-two-different-columns-tables/m-p/4421404#M175539</guid>
      <dc:creator>Silvard</dc:creator>
      <dc:date>2025-02-21T07:43:14Z</dc:date>
    </item>
    <item>
      <title>Re: Iterate over two different columns/tables</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Iterate-over-two-different-columns-tables/m-p/4423735#M175615</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="803517" data-lia-user-login="Silvard" class="lia-mention lia-mention-user"&gt;Silvard&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;You can describe your needs with specific data, which can help realize your output faster.&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Best Regards,&lt;BR /&gt;Yang&lt;/SPAN&gt;&lt;SPAN&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;Community Support Team&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 24 Feb 2025 02:06:06 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Iterate-over-two-different-columns-tables/m-p/4423735#M175615</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2025-02-24T02:06:06Z</dc:date>
    </item>
  </channel>
</rss>

