<?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 a value from a specific row in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Return-a-value-from-a-specific-row/m-p/1323882#M23317</link>
    <description>&lt;P&gt;I feel like this should be easy but I am having trouble.&lt;/P&gt;&lt;P&gt;pretty much what I have is a table with these values:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;ChallengeID&amp;nbsp; &amp;nbsp; &amp;nbsp;Progress&amp;nbsp; &amp;nbsp; &amp;nbsp;UserCount&lt;/P&gt;&lt;P&gt;ABD-5FGD&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;1200&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;67&lt;/P&gt;&lt;P&gt;ABD-5FGD&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 457&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 150&lt;/P&gt;&lt;P&gt;ACG-HIFR&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;267&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 84&lt;/P&gt;&lt;P&gt;ACG-HIFR&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;3700&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 35&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to create a new column that returns the userCount that is related to the maximum value of progress for that specific challengeID. In the case above the table should look like this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;ChallengeID&amp;nbsp; &amp;nbsp; &amp;nbsp;Progress&amp;nbsp; &amp;nbsp; &amp;nbsp;UserCount&amp;nbsp; &amp;nbsp; &amp;nbsp;NewColumn&lt;/P&gt;&lt;P&gt;ABD-5FGD&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;1200&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;67&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 67&lt;/P&gt;&lt;P&gt;ABD-5FGD&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 457&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 150&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 67&lt;/P&gt;&lt;P&gt;ACG-HIFR&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;267&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 84&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 35&lt;/P&gt;&lt;P&gt;ACG-HIFR&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;3700&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 35&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 35&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I don't really even know where to start or if this is even possible. Help would be much appreciated. Thank you!&lt;/P&gt;</description>
    <pubDate>Tue, 25 Aug 2020 21:07:18 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2020-08-25T21:07:18Z</dc:date>
    <item>
      <title>Return a value from a specific row</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Return-a-value-from-a-specific-row/m-p/1323882#M23317</link>
      <description>&lt;P&gt;I feel like this should be easy but I am having trouble.&lt;/P&gt;&lt;P&gt;pretty much what I have is a table with these values:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;ChallengeID&amp;nbsp; &amp;nbsp; &amp;nbsp;Progress&amp;nbsp; &amp;nbsp; &amp;nbsp;UserCount&lt;/P&gt;&lt;P&gt;ABD-5FGD&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;1200&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;67&lt;/P&gt;&lt;P&gt;ABD-5FGD&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 457&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 150&lt;/P&gt;&lt;P&gt;ACG-HIFR&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;267&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 84&lt;/P&gt;&lt;P&gt;ACG-HIFR&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;3700&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 35&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to create a new column that returns the userCount that is related to the maximum value of progress for that specific challengeID. In the case above the table should look like this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;ChallengeID&amp;nbsp; &amp;nbsp; &amp;nbsp;Progress&amp;nbsp; &amp;nbsp; &amp;nbsp;UserCount&amp;nbsp; &amp;nbsp; &amp;nbsp;NewColumn&lt;/P&gt;&lt;P&gt;ABD-5FGD&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;1200&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;67&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 67&lt;/P&gt;&lt;P&gt;ABD-5FGD&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 457&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 150&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 67&lt;/P&gt;&lt;P&gt;ACG-HIFR&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;267&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 84&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 35&lt;/P&gt;&lt;P&gt;ACG-HIFR&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;3700&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 35&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 35&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I don't really even know where to start or if this is even possible. Help would be much appreciated. Thank you!&lt;/P&gt;</description>
      <pubDate>Tue, 25 Aug 2020 21:07:18 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Return-a-value-from-a-specific-row/m-p/1323882#M23317</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-08-25T21:07:18Z</dc:date>
    </item>
    <item>
      <title>Re: Return a value from a specific row</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Return-a-value-from-a-specific-row/m-p/1323956#M23325</link>
      <description>&lt;P&gt;Anonymous&lt;/LI-USER&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Try this&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;NewColumn = CALCULATE(MAX('Table'[UserCount]), &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;ALLEXCEPT('Table','Table'[ChallengeID]))&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Let me know if it helps, please change 'Table' to your table name &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Tue, 25 Aug 2020 21:58:42 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Return-a-value-from-a-specific-row/m-p/1323956#M23325</guid>
      <dc:creator>mhossain</dc:creator>
      <dc:date>2020-08-25T21:58:42Z</dc:date>
    </item>
    <item>
      <title>Re: Return a value from a specific row</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Return-a-value-from-a-specific-row/m-p/1323974#M23327</link>
      <description>&lt;P&gt;Hi Bigascon,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If you need it as a calculated column this should work. I am not sure if it is the fastest way. Maybe somebody has a faster way:)&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Usercount max progress =
//calculate maxprogress for challengeid
VAR MAXPROGRESS =
    CALCULATE (
        MAX ( 'example'[Progress] ),
        FILTER (
            'example',
            'example'[ChallengeID] = EARLIER ( 'example'[ChallengeID] )
        )
    ) //calculate usercount for row that contains maxprogress (highest if 2 rows are equal in progress  
VAR USERCOUNT =
    CALCULATE (
        MAXX (
            FILTER ( 'example', 'example'[Progress] = MAXPROGRESS ),
            'example'[UserCount]
        ),
        ALLEXCEPT ( 'example', 'example'[ChallengeID] )
    )
RETURN
    USERCOUNT&lt;/LI-CODE&gt;</description>
      <pubDate>Tue, 25 Aug 2020 22:02:38 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Return-a-value-from-a-specific-row/m-p/1323974#M23327</guid>
      <dc:creator>jeroendekker</dc:creator>
      <dc:date>2020-08-25T22:02:38Z</dc:date>
    </item>
    <item>
      <title>Re: Return a value from a specific row</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Return-a-value-from-a-specific-row/m-p/1324030#M23329</link>
      <description>&lt;P&gt;Please try this column expression&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;DIV&gt;
&lt;DIV&gt;NewColumn 2 =&lt;BR /&gt;VAR maxthisID =&lt;BR /&gt;CALCULATE (&lt;BR /&gt;MAX ( Challenge[Progress] ),&lt;BR /&gt;ALLEXCEPT ( Challenge, Challenge[ChallengeID] )&lt;BR /&gt;)&lt;BR /&gt;RETURN&lt;BR /&gt;CALCULATE (&lt;BR /&gt;MAX ( Challenge[UserCount] ),&lt;BR /&gt;ALLEXCEPT ( Challenge, Challenge[ChallengeID] ),&lt;BR /&gt;Challenge[Progress] = maxthisID&lt;BR /&gt;)&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;
&lt;P&gt;If this works for you, please mark it as the solution.&amp;nbsp; Kudos are appreciated too.&amp;nbsp; Please let me know if not.&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;Pat&lt;/P&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;</description>
      <pubDate>Tue, 25 Aug 2020 22:35:02 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Return-a-value-from-a-specific-row/m-p/1324030#M23329</guid>
      <dc:creator>mahoneypat</dc:creator>
      <dc:date>2020-08-25T22:35:02Z</dc:date>
    </item>
  </channel>
</rss>

