<?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: Switch date table using virtual relationship in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Switch-date-table-using-virtual-relationship/m-p/3384823#M127530</link>
    <description>&lt;P&gt;Try&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;My Measure =
CALCULATE (
    [no of deliveries],
    TREATAS ( VALUES ( 'Dim - Date'[ID_Date] ), 'Dim-OutboundDate'[ID_Date] ),
    REMOVEFILTERS ( 'Dim - Date' )
)
&lt;/LI-CODE&gt;</description>
    <pubDate>Thu, 17 Aug 2023 09:03:43 GMT</pubDate>
    <dc:creator>johnt75</dc:creator>
    <dc:date>2023-08-17T09:03:43Z</dc:date>
    <item>
      <title>Switch date table using virtual relationship</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Switch-date-table-using-virtual-relationship/m-p/3384531#M127517</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a measure called [no of deliveries] which I normally use with my date table &amp;nbsp;‘Dim-OutboundDate’&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I need to use this measure with my other date table ‘Dim-Date’, and the outcome should be the same.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;No matter what I try though, the outcome is different when I group it by week in the visual.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is the new measure I’m trying to create:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;CALCULATE(&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; [no of deliveries],&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; TREATAS(&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; VALUES(&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 'Dim - Date'[ID_Date]&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ),&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ‘Dim-OutboundDate’ [ID_Date]&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ))&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Below is my data model (one to many) and I am restricted to do any physical changes with the relationships, so I need to solve this with a measure.&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;&lt;P&gt;Many thanks!&lt;/P&gt;</description>
      <pubDate>Thu, 17 Aug 2023 07:10:35 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Switch-date-table-using-virtual-relationship/m-p/3384531#M127517</guid>
      <dc:creator>mrclay82</dc:creator>
      <dc:date>2023-08-17T07:10:35Z</dc:date>
    </item>
    <item>
      <title>Re: Switch date table using virtual relationship</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Switch-date-table-using-virtual-relationship/m-p/3384823#M127530</link>
      <description>&lt;P&gt;Try&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;My Measure =
CALCULATE (
    [no of deliveries],
    TREATAS ( VALUES ( 'Dim - Date'[ID_Date] ), 'Dim-OutboundDate'[ID_Date] ),
    REMOVEFILTERS ( 'Dim - Date' )
)
&lt;/LI-CODE&gt;</description>
      <pubDate>Thu, 17 Aug 2023 09:03:43 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Switch-date-table-using-virtual-relationship/m-p/3384823#M127530</guid>
      <dc:creator>johnt75</dc:creator>
      <dc:date>2023-08-17T09:03:43Z</dc:date>
    </item>
    <item>
      <title>Re: Switch date table using virtual relationship</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Switch-date-table-using-virtual-relationship/m-p/3385239#M127557</link>
      <description>&lt;P&gt;It worked! I am really impressed by you sir!&lt;BR /&gt;Many thanks!&lt;/P&gt;</description>
      <pubDate>Thu, 17 Aug 2023 12:13:49 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Switch-date-table-using-virtual-relationship/m-p/3385239#M127557</guid>
      <dc:creator>mrclay82</dc:creator>
      <dc:date>2023-08-17T12:13:49Z</dc:date>
    </item>
  </channel>
</rss>

