<?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: calculated column in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/calculated-column/m-p/2985744#M100191</link>
    <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="421442" data-lia-user-login="murillocosta" class="lia-mention lia-mention-user"&gt;murillocosta&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;If this post helps, please consider accept as solution to help other members find it more quickly.&lt;/P&gt;</description>
    <pubDate>Fri, 23 Dec 2022 05:20:45 GMT</pubDate>
    <dc:creator>Mahesh0016</dc:creator>
    <dc:date>2022-12-23T05:20:45Z</dc:date>
    <item>
      <title>calculated column</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/calculated-column/m-p/2982931#M100028</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Could someone help me achieve the below.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a table which I need to find the max &lt;STRONG&gt;period_id &lt;/STRONG&gt;per &lt;STRONG&gt;per facility_id&lt;/STRONG&gt;&amp;nbsp;like the example below 425 to facility 1 and 424 to facility 4.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Once I figure this value out I need to get another column value (exchange_rate) and repeat it to the others rows for that &lt;STRONG&gt;facility_id&lt;/STRONG&gt; as shown below.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I can't use power Query as I need to dynamically change this table when the main date slicer is changed&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Tks&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>Wed, 21 Dec 2022 23:34:24 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/calculated-column/m-p/2982931#M100028</guid>
      <dc:creator>murillocosta</dc:creator>
      <dc:date>2022-12-21T23:34:24Z</dc:date>
    </item>
    <item>
      <title>Re: calculated column</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/calculated-column/m-p/2982960#M100033</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="421442" data-lia-user-login="murillocosta" class="lia-mention lia-mention-user"&gt;murillocosta&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;please try&lt;/P&gt;
&lt;P&gt;NewColumn =&lt;BR /&gt;MAXX (&lt;BR /&gt;TOPN (&lt;BR /&gt;1,&lt;BR /&gt;CALCULATETABLE ( Table01, ALLEXCEPT ( Table01, Table01[FACILITY_ID] ) ),&lt;BR /&gt;Table01[PERIOD_ID]&lt;BR /&gt;),&lt;BR /&gt;Table01[EXCHANGE_RATE]&lt;BR /&gt;)&lt;/P&gt;</description>
      <pubDate>Wed, 21 Dec 2022 23:58:25 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/calculated-column/m-p/2982960#M100033</guid>
      <dc:creator>tamerj1</dc:creator>
      <dc:date>2022-12-21T23:58:25Z</dc:date>
    </item>
    <item>
      <title>Re: calculated column</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/calculated-column/m-p/2985683#M100180</link>
      <description>&lt;P&gt;apparently tamerj1's solution worked perfectly and more elegant, but this might be easier to digest:&lt;/P&gt;&lt;LI-CODE lang="python"&gt;result2 = 
VAR _facility = [FACILITY_ID]
VAR _period = 
MAXX(
    FILTER(
        Table01,
        Table01[FACILITY_ID] = _facility
    ),
    Table01[PERIOD_ID]
)
RETURN
MINX(
    FILTER(
        Table01,
        Table01[FACILITY_ID]=_facility&amp;amp;&amp;amp;Table01[PERIOD_ID] = _period
    ),
    Table01[EXCHANGE_RATE]
)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 23 Dec 2022 04:10:28 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/calculated-column/m-p/2985683#M100180</guid>
      <dc:creator>FreemanZ</dc:creator>
      <dc:date>2022-12-23T04:10:28Z</dc:date>
    </item>
    <item>
      <title>Re: calculated column</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/calculated-column/m-p/2985744#M100191</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="421442" data-lia-user-login="murillocosta" class="lia-mention lia-mention-user"&gt;murillocosta&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;If this post helps, please consider accept as solution to help other members find it more quickly.&lt;/P&gt;</description>
      <pubDate>Fri, 23 Dec 2022 05:20:45 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/calculated-column/m-p/2985744#M100191</guid>
      <dc:creator>Mahesh0016</dc:creator>
      <dc:date>2022-12-23T05:20:45Z</dc:date>
    </item>
    <item>
      <title>Re: calculated column</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/calculated-column/m-p/2985938#M100215</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="460868" data-lia-user-login="FreemanZ" class="lia-mention lia-mention-user"&gt;FreemanZ&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;To avoid double scan of the table you can use&lt;/P&gt;
&lt;P&gt;result2 =&lt;BR /&gt;VAR _facility = [FACILITY_ID]&lt;BR /&gt;VAR T =&lt;BR /&gt;FILTER ( Table01, Table01[FACILITY_ID] = _facility )&lt;BR /&gt;VAR _period =&lt;BR /&gt;MAXX ( T, Table01[PERIOD_ID] )&lt;BR /&gt;RETURN&lt;BR /&gt;MINX ( FILTER ( T, Table01[PERIOD_ID] = _period ), Table01[EXCHANGE_RATE] )&lt;/P&gt;</description>
      <pubDate>Fri, 23 Dec 2022 08:18:21 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/calculated-column/m-p/2985938#M100215</guid>
      <dc:creator>tamerj1</dc:creator>
      <dc:date>2022-12-23T08:18:21Z</dc:date>
    </item>
    <item>
      <title>Re: calculated column</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/calculated-column/m-p/2985945#M100216</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="317289" data-lia-user-login="tamerj1" class="lia-mention lia-mention-user"&gt;tamerj1&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you very much.&amp;nbsp;That is a good use of table variable. I actually have such double scans very often. It is very insightful. Learned a lot from you.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 23 Dec 2022 08:21:33 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/calculated-column/m-p/2985945#M100216</guid>
      <dc:creator>FreemanZ</dc:creator>
      <dc:date>2022-12-23T08:21:33Z</dc:date>
    </item>
    <item>
      <title>Re: calculated column</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/calculated-column/m-p/2999711#M101229</link>
      <description>&lt;P&gt;Thanks guys that's really helpfull.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The only thing I forgot to mention is that I also to need to filter the MAX date selected from my calendar table on the slice.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Like in the example below I selected 31/10/2021 which is period 400 for subsidiary 1, but the measure is bringing 426 which is the highest period on the overall table.&lt;/P&gt;&lt;P&gt;Any idea the best whey to apply this calendar date filter?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&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;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 04 Jan 2023 01:25:38 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/calculated-column/m-p/2999711#M101229</guid>
      <dc:creator>murillocosta</dc:creator>
      <dc:date>2023-01-04T01:25:38Z</dc:date>
    </item>
  </channel>
</rss>

