<?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 relating or looking up values in virtual tables in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/relating-or-looking-up-values-in-virtual-tables/m-p/2323250#M58066</link>
    <description>&lt;P&gt;I have vitual tables each one shows the expected sales dates for a particular project. One is based on the budgeted date and the other is based on the current dates. I want to compare the 1st current date to the 1st budget date and then the 2nd current date to the 2nd budget date, and so on. I created a meausre that indexes them 1,2,3,n [CENumber] with the thoguht that I could match them up and calcualte the difference in dates.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I cant seem to figure out how to relate or lookup the date values between these tables in order to calcualte the difference and then sum the total delay. Any help would be appreciated&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Below is the code that gets me each of the tables for a particular project and year but I am stuck on how to relate or look up dates between them to calculate the difference.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;var&lt;/SPAN&gt; &lt;SPAN&gt;_projname&lt;/SPAN&gt;&lt;SPAN&gt; =&lt;/SPAN&gt;&lt;SPAN&gt;"Marshall Gardens"&lt;/SPAN&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;SPAN&gt;var&lt;/SPAN&gt; &lt;SPAN&gt;_TableCurrent&lt;/SPAN&gt;&lt;SPAN&gt; = &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;ADDCOLUMNS&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;SEL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t;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;// filter down to year and prject&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;FILTER&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;dimDate&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt;dimDate[Date]&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;[Year]&lt;/SPAN&gt;&lt;SPAN&gt; = &lt;/SPAN&gt;&lt;SPAN&gt;2022&lt;/SPAN&gt;&lt;SPAN&gt;),&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;FILTER&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;Project&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt;Project[ProjectName]&lt;/SPAN&gt;&lt;SPAN&gt; = &lt;/SPAN&gt;&lt;SPAN&gt;_projname&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;),&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;"dateBudget"&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt;[Date]&lt;/SPAN&gt;&lt;SPAN&gt;),&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;"CENumber"&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt;[NumberSelectedDates]&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 07 Feb 2022 13:55:03 GMT</pubDate>
    <dc:creator>mgrayTCB</dc:creator>
    <dc:date>2022-02-07T13:55:03Z</dc:date>
    <item>
      <title>relating or looking up values in virtual tables</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/relating-or-looking-up-values-in-virtual-tables/m-p/2323250#M58066</link>
      <description>&lt;P&gt;I have vitual tables each one shows the expected sales dates for a particular project. One is based on the budgeted date and the other is based on the current dates. I want to compare the 1st current date to the 1st budget date and then the 2nd current date to the 2nd budget date, and so on. I created a meausre that indexes them 1,2,3,n [CENumber] with the thoguht that I could match them up and calcualte the difference in dates.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I cant seem to figure out how to relate or lookup the date values between these tables in order to calcualte the difference and then sum the total delay. Any help would be appreciated&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Below is the code that gets me each of the tables for a particular project and year but I am stuck on how to relate or look up dates between them to calculate the difference.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;var&lt;/SPAN&gt; &lt;SPAN&gt;_projname&lt;/SPAN&gt;&lt;SPAN&gt; =&lt;/SPAN&gt;&lt;SPAN&gt;"Marshall Gardens"&lt;/SPAN&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;SPAN&gt;var&lt;/SPAN&gt; &lt;SPAN&gt;_TableCurrent&lt;/SPAN&gt;&lt;SPAN&gt; = &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;ADDCOLUMNS&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;SELECTCOLUMNS&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;CALCULATETABLE&lt;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TER&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;dimDate&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt;dimDate[Date]&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;[Year]&lt;/SPAN&gt;&lt;SPAN&gt; = &lt;/SPAN&gt;&lt;SPAN&gt;2022&lt;/SPAN&gt;&lt;SPAN&gt;),&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;FILTER&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;Project&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt;Project[ProjectName]&lt;/SPAN&gt;&lt;SPAN&gt; = &lt;/SPAN&gt;&lt;SPAN&gt;_projname&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;),&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;"dateBudget"&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt;[Date]&lt;/SPAN&gt;&lt;SPAN&gt;),&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;"CENumber"&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt;[NumberSelectedDates]&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 07 Feb 2022 13:55:03 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/relating-or-looking-up-values-in-virtual-tables/m-p/2323250#M58066</guid>
      <dc:creator>mgrayTCB</dc:creator>
      <dc:date>2022-02-07T13:55:03Z</dc:date>
    </item>
    <item>
      <title>Re: relating or looking up values in virtual tables</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/relating-or-looking-up-values-in-virtual-tables/m-p/2323388#M58076</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="305529" data-lia-user-login="mgrayTCB" class="lia-mention lia-mention-user"&gt;mgrayTCB&lt;/a&gt; , when you have the common date and project taking a diff measure at a visual level between measures from two tables for the displayed column &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If this does not help&lt;BR /&gt;Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.&lt;/P&gt;</description>
      <pubDate>Mon, 07 Feb 2022 15:15:13 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/relating-or-looking-up-values-in-virtual-tables/m-p/2323388#M58076</guid>
      <dc:creator>amitchandak</dc:creator>
      <dc:date>2022-02-07T15:15:13Z</dc:date>
    </item>
    <item>
      <title>Re: relating or looking up values in virtual tables</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/relating-or-looking-up-values-in-virtual-tables/m-p/2323517#M58086</link>
      <description>&lt;P&gt;Thank you for thinking about this. Here is a bit more detail. I have a budget table(DevRevenueBudget) and a Current table (DevRevenue). Budget was frozen at the begining of the year. Each project has a series of sales events they were sechedule on cetrain dates at budget time but now have updated (current dates). I want to calculate the delay. See model and expected result.&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;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 07 Feb 2022 15:55:33 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/relating-or-looking-up-values-in-virtual-tables/m-p/2323517#M58086</guid>
      <dc:creator>mgrayTCB</dc:creator>
      <dc:date>2022-02-07T15:55:33Z</dc:date>
    </item>
    <item>
      <title>Re: relating or looking up values in virtual tables</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/relating-or-looking-up-values-in-virtual-tables/m-p/2329944#M58496</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="305529" data-lia-user-login="mgrayTCB" class="lia-mention lia-mention-user"&gt;mgrayTCB&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Not sure if I understand correctly. I create the following example data. =&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&amp;nbsp; &amp;nbsp;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Then add index to pre group.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt; #"Grouped Rows" = Table.Group(#"Changed Type", {"ProjectID"}, {{"Group", each _, type table [Date=nullable date, ProjectID=nullable number]}}),
    #"Added Custom" = Table.AddColumn(#"Grouped Rows", "Custom", each Table.AddIndexColumn(Table.Sort([Group],{{"Date", Order.Ascending}}), "Index", 1, 1, Int64.Type)),
    #"Removed Other Columns" = Table.SelectColumns(#"Added Custom",{"Custom"}),
    #"Expanded Custom" = Table.ExpandTableColumn(#"Removed Other Columns", "Custom", {"Date", "ProjectID", "Index"}, {"Date", "ProjectID", "Index"})&lt;/LI-CODE&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Create calaulated table [Index] and create relationship with table [DevRevenueBudget] and [DevRevenue].&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Index = 
DISTINCT (
    UNION ( VALUES ( DevRevenue[Index] ), VALUES ( DevRevenueBudget[Index] ) )
)&lt;/LI-CODE&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Then create the measure.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Measure = 
DATEDIFF (
    SELECTEDVALUE ( DevRevenue[Date] ),
    SELECTEDVALUE ( DevRevenueBudget[Date] ),
    DAY
)&lt;/LI-CODE&gt;
&lt;P&gt;&lt;img /&gt;&amp;nbsp; &amp;nbsp;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If the problem is still not resolved, please provide detailed error information or the expected result you expect. Let me know immediately, looking forward to your reply.&lt;BR /&gt;Best Regards,&lt;BR /&gt;Winniz&lt;BR /&gt;If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 10 Feb 2022 06:19:38 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/relating-or-looking-up-values-in-virtual-tables/m-p/2329944#M58496</guid>
      <dc:creator>v-kkf-msft</dc:creator>
      <dc:date>2022-02-10T06:19:38Z</dc:date>
    </item>
    <item>
      <title>Re: relating or looking up values in virtual tables</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/relating-or-looking-up-values-in-virtual-tables/m-p/2331063#M58583</link>
      <description>&lt;P&gt;This is very helpful. I will work through this solution with my data and let you know if I have any questions&lt;/P&gt;</description>
      <pubDate>Thu, 10 Feb 2022 14:28:46 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/relating-or-looking-up-values-in-virtual-tables/m-p/2331063#M58583</guid>
      <dc:creator>mgrayTCB</dc:creator>
      <dc:date>2022-02-10T14:28:46Z</dc:date>
    </item>
    <item>
      <title>Re: relating or looking up values in virtual tables</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/relating-or-looking-up-values-in-virtual-tables/m-p/2331518#M58604</link>
      <description>&lt;P&gt;I am working though this and trying to add the index to the revenue table. I got the grouping step to work but cant get the index step to work. I keep getting this error:&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;This is the M code I am trying to add in the Add Custom column step.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Table.AddIndexColumn(Table.Sort[Group],{{"DateActOrEst",Order.Ascending}},"Index",1,1,Int64.Type)&lt;/P&gt;&lt;P&gt;This was taken right from your example other than the name of the date field.&lt;/P&gt;</description>
      <pubDate>Thu, 10 Feb 2022 17:36:57 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/relating-or-looking-up-values-in-virtual-tables/m-p/2331518#M58604</guid>
      <dc:creator>mgrayTCB</dc:creator>
      <dc:date>2022-02-10T17:36:57Z</dc:date>
    </item>
    <item>
      <title>Re: relating or looking up values in virtual tables</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/relating-or-looking-up-values-in-virtual-tables/m-p/2332673#M58658</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="305529" data-lia-user-login="mgrayTCB" class="lia-mention lia-mention-user"&gt;mgrayTCB&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I think you're ignoring the parentheses of Table.Sort function. Please try this:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;= Table.AddIndexColumn( Table.Sort( [Group], { {"Date",  Order.Ascending} } ), "Index", 1, 1, Int64.Type )&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If the problem is still not resolved, please provide detailed error information or the expected result you expect. Let me know immediately, looking forward to your reply.&lt;BR /&gt;Best Regards,&lt;BR /&gt;Winniz&lt;BR /&gt;If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.&lt;/P&gt;</description>
      <pubDate>Fri, 11 Feb 2022 07:52:45 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/relating-or-looking-up-values-in-virtual-tables/m-p/2332673#M58658</guid>
      <dc:creator>v-kkf-msft</dc:creator>
      <dc:date>2022-02-11T07:52:45Z</dc:date>
    </item>
  </channel>
</rss>

