<?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 Return name for operation name in row context in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Return-name-for-operation-name-in-row-context/m-p/2799808#M88061</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I have such expression in dax:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;EVALUATE
FILTER (
    ADDCOLUMNS (
        DISTINCT ( table_name[order_num] ),
        "min_nr_oper",
            IF (
                CALCULATE (
                    MIN ( table_name[date] )
                )
                    &amp;lt;= TODAY () - 55
                        - WEEKDAY (
                            TODAY ()
                        ),
                CALCULATE (
                    MIN ( table_name[operation_num] )
                        &amp;amp; MIN ( table_name[name] )
                ),
                BLANK ()
            )
    ),
    [order_num] = "4005875120"
)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;That returns me min value for operation in orders.&lt;/P&gt;&lt;P&gt;I would like to add column or concatenate with name for this operation but each time i receive problem - it returns me value for minimum name for this operation instead of current operation.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Expected return should be:&lt;/P&gt;&lt;P&gt;4005875120&amp;nbsp; &amp;nbsp; &amp;nbsp;225MYJ&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But it is:&lt;/P&gt;&lt;P&gt;4005875120&amp;nbsp; &amp;nbsp; &amp;nbsp;225CECH&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How can i fix this ?&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>Tue, 27 Sep 2022 13:29:38 GMT</pubDate>
    <dc:creator>ToKo</dc:creator>
    <dc:date>2022-09-27T13:29:38Z</dc:date>
    <item>
      <title>Return name for operation name in row context</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Return-name-for-operation-name-in-row-context/m-p/2799808#M88061</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I have such expression in dax:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;EVALUATE
FILTER (
    ADDCOLUMNS (
        DISTINCT ( table_name[order_num] ),
        "min_nr_oper",
            IF (
                CALCULATE (
                    MIN ( table_name[date] )
                )
                    &amp;lt;= TODAY () - 55
                        - WEEKDAY (
                            TODAY ()
                        ),
                CALCULATE (
                    MIN ( table_name[operation_num] )
                        &amp;amp; MIN ( table_name[name] )
                ),
                BLANK ()
            )
    ),
    [order_num] = "4005875120"
)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;That returns me min value for operation in orders.&lt;/P&gt;&lt;P&gt;I would like to add column or concatenate with name for this operation but each time i receive problem - it returns me value for minimum name for this operation instead of current operation.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Expected return should be:&lt;/P&gt;&lt;P&gt;4005875120&amp;nbsp; &amp;nbsp; &amp;nbsp;225MYJ&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But it is:&lt;/P&gt;&lt;P&gt;4005875120&amp;nbsp; &amp;nbsp; &amp;nbsp;225CECH&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How can i fix this ?&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>Tue, 27 Sep 2022 13:29:38 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Return-name-for-operation-name-in-row-context/m-p/2799808#M88061</guid>
      <dc:creator>ToKo</dc:creator>
      <dc:date>2022-09-27T13:29:38Z</dc:date>
    </item>
    <item>
      <title>Re: Return name for operation name in row context</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Return-name-for-operation-name-in-row-context/m-p/2801421#M88150</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="193460" data-lia-user-login="ToKo" class="lia-mention lia-mention-user"&gt;ToKo&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;What is your table 'table_name' looks like? What is your current operation mean? Could you please provide a simple example about this(&lt;SPAN&gt;after&amp;nbsp;&lt;STRONG&gt;removing sensitive data&lt;/STRONG&gt;&lt;/SPAN&gt;)?&lt;/P&gt;
&lt;P&gt;According to my knowledge, this issue may caused by:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="javascript"&gt;CALCULATE (
                    MIN ( table_name[operation_num] )
                        &amp;amp; MIN ( table_name[name] )
                )&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please try:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="javascript"&gt;EVALUATE
FILTER (
    ADDCOLUMNS (
        DISTINCT ( table_name[order_num] ),
        "min_nr_oper",
            IF (
                CALCULATE (
                    MIN ( table_name[date] )
                )
                    &amp;lt;= TODAY () - 55
                        - WEEKDAY (
                            TODAY ()
                        ),
                CALCULATE (
                    MIN ( table_name[operation_num] )
                )
                 &amp;amp; MIN ( table_name[name] ),
                BLANK ()
            )
    ),
    [order_num] = "4005875120"
)&lt;/LI-CODE&gt;
&lt;P&gt;If you want to understand context transaction, please refer to:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://www.sqlbi.com/articles/understanding-context-transition/" target="_blank"&gt; Understanding Context Transition - SQLBI&lt;/A&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="background: white; margin: 7.5pt 0in 0in 0in;"&gt;&lt;SPAN&gt;Best Regards,&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="background: white; margin: 7.5pt 0in 0in 0in;"&gt;&lt;SPAN&gt;Jianbo Li&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="background: white; margin: 7.5pt 0in 0in 0in;"&gt;&lt;SPAN&gt;If this post&amp;nbsp;&lt;STRONG&gt;&lt;I&gt;helps&lt;/I&gt;&lt;/STRONG&gt;, then please consider&amp;nbsp;&lt;STRONG&gt;&lt;I&gt;Accept it as the solution&lt;/I&gt;&lt;/STRONG&gt;&amp;nbsp;to help the other members find it more quickly.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 28 Sep 2022 02:08:45 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Return-name-for-operation-name-in-row-context/m-p/2801421#M88150</guid>
      <dc:creator>v-jianboli-msft</dc:creator>
      <dc:date>2022-09-28T02:08:45Z</dc:date>
    </item>
    <item>
      <title>Re: Return name for operation name in row context</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Return-name-for-operation-name-in-row-context/m-p/2801823#M88175</link>
      <description>&lt;P&gt;Hi &lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="403972" data-lia-user-login="v-jianboli-msft" class="lia-mention lia-mention-user"&gt;v-jianboli-msft&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;table_name below:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;order_num	date	operation_num	name
4005875120	2022-06-13	225	MYJ
4005875120	2022-06-18	230	SLU
4005875120	2022-06-19	235	MYJ
4005875120	2022-06-19	245	H/T 1
4005875120	2022-06-19	250	H/T 1
4005875120	2022-06-21	255	H/T 1
4005875120	2022-06-24	270	H/T 1
4005875120	2022-06-25	275	H/T 1
4005875120	2022-06-25	279	K.KOP1
4005875120	2022-06-29	281	K.KOP2
4005875120	2022-06-29	285	H/T 1
4005875120	2022-06-29	319	K.KOP1
4005875120	2022-07-04	321	K.KOP2
4005875120	2022-07-05	325	H/T 1
4005875120	2022-07-05	330	H/T 1
4005875120	2022-07-06	335	H/T 1
4005875120	2022-07-06	340	H/T 1
4005875120	2022-07-06	344	K.KOP1
4005875120	2022-07-09	346	K.KOP2
4005875120	2022-07-09	350	H/T 1
4005875120	2022-07-09	355	H/T 1
4005875120	2022-07-09	358	H/T 1
4005875120	2022-07-10	360	H/T 1
4005875120	2022-07-10	375	FAZ
4005875120	2022-07-11	380	KEL2
4005875120	2022-07-11	385	CECH
4005875120	2022-07-15	400	MAZ
4005875120	2022-07-16	460	KEL2
4005875120	2022-07-17	480	KEL2
4005875120	2022-07-17	495	CECH
4005875120	2022-07-18	500	#N/A&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried your code but it returns min for entire operation name which is #N/A i want to return value for 225 operation - MYJ.&lt;/P&gt;&lt;P&gt;I will &lt;SPAN&gt;carefully analyze Context Transition.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 29 Sep 2022 06:12:10 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Return-name-for-operation-name-in-row-context/m-p/2801823#M88175</guid>
      <dc:creator>ToKo</dc:creator>
      <dc:date>2022-09-29T06:12:10Z</dc:date>
    </item>
  </channel>
</rss>

