<?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 Dax code or create table in model? in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dax-code-or-create-table-in-model/m-p/2051655#M46163</link>
    <description>&lt;P&gt;I have a pbix where I consume from a SSAS cube.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The SSAS cube has &lt;STRONG&gt;FactRevenue&lt;/STRONG&gt; and a &lt;STRONG&gt;Segm&lt;/STRONG&gt; dimension.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In order to retrieve ‘current’ segm, I created the below table in the cube (via sql consumption):&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;SELECT distinct t1.Key_Segm, t2.CustomerNo,t2.Segment

FROM Segm T1 join  Segm T2

on t1.CustomerNo = t2.CustomerNo

WHERE t2.TimeTo is null&lt;/LI-CODE&gt;&lt;P&gt;table name: CurrentSegm&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;And in the cube I connected it to &lt;STRONG&gt;FactRevenue&lt;/STRONG&gt;.&amp;nbsp; &amp;nbsp;( FactRevenue[Key_Segm] -----&amp;gt; CurrentSegm[Key_Segm] )&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there a way of doing this in DAX?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;(Performance-wise&amp;nbsp; I believe having the table in the cube shall be faster I assume).&lt;/P&gt;</description>
    <pubDate>Wed, 01 Sep 2021 14:40:02 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2021-09-01T14:40:02Z</dc:date>
    <item>
      <title>Dax code or create table in model?</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dax-code-or-create-table-in-model/m-p/2051655#M46163</link>
      <description>&lt;P&gt;I have a pbix where I consume from a SSAS cube.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The SSAS cube has &lt;STRONG&gt;FactRevenue&lt;/STRONG&gt; and a &lt;STRONG&gt;Segm&lt;/STRONG&gt; dimension.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In order to retrieve ‘current’ segm, I created the below table in the cube (via sql consumption):&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;SELECT distinct t1.Key_Segm, t2.CustomerNo,t2.Segment

FROM Segm T1 join  Segm T2

on t1.CustomerNo = t2.CustomerNo

WHERE t2.TimeTo is null&lt;/LI-CODE&gt;&lt;P&gt;table name: CurrentSegm&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;And in the cube I connected it to &lt;STRONG&gt;FactRevenue&lt;/STRONG&gt;.&amp;nbsp; &amp;nbsp;( FactRevenue[Key_Segm] -----&amp;gt; CurrentSegm[Key_Segm] )&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there a way of doing this in DAX?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;(Performance-wise&amp;nbsp; I believe having the table in the cube shall be faster I assume).&lt;/P&gt;</description>
      <pubDate>Wed, 01 Sep 2021 14:40:02 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dax-code-or-create-table-in-model/m-p/2051655#M46163</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-09-01T14:40:02Z</dc:date>
    </item>
    <item>
      <title>Re: Dax code or create table in model?</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dax-code-or-create-table-in-model/m-p/2052902#M46223</link>
      <description>&lt;P&gt;Anonymous&lt;/LI-USER&gt; , NATURALINNERJOIN along with filter on t2[time]&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;example&lt;/P&gt;
&lt;P&gt;filter(NATURALINNERJOIN (t1,t2),&amp;nbsp; isblank(t2[time])) &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://www.sqlbi.com/articles/from-sql-to-dax-joining-tables/" target="_blank"&gt;https://www.sqlbi.com/articles/from-sql-to-dax-joining-tables/&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 02 Sep 2021 05:58:20 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dax-code-or-create-table-in-model/m-p/2052902#M46223</guid>
      <dc:creator>amitchandak</dc:creator>
      <dc:date>2021-09-02T05:58:20Z</dc:date>
    </item>
  </channel>
</rss>

