<?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: get latest text value by columns in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/get-latest-text-value-by-columns/m-p/4551063#M175635</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="879217" data-lia-user-login="COU_Alan" class="lia-mention lia-mention-user"&gt;COU_Alan&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It looks like it's easier to treat Latest Comment as a static column, if that meets your requirements.&lt;/P&gt;
&lt;P&gt;Then you can included it as a Row field in a matrix like this:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Latest Comment Column = 
CALCULATE (
    CALCULATE (
        CONCATENATEX ( Data, Data[comment], "|" ),
        TOPN ( 1, SUMMARIZE ( Data, Data[date], Data[time] ), Data[date] + Data[time], DESC )
    ),
    ALLEXCEPT ( Data, Data[part], Data[project_name] )
)&lt;/LI-CODE&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;It's much easier to place "supplementary" columns on the left (if they are static) as Row fields. Placing them on the right requires some adjustments to the model.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Would this work for you?&lt;/P&gt;</description>
    <pubDate>Mon, 24 Feb 2025 22:01:25 GMT</pubDate>
    <dc:creator>OwenAuger</dc:creator>
    <dc:date>2025-02-24T22:01:25Z</dc:date>
    <item>
      <title>get latest text value by columns</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/get-latest-text-value-by-columns/m-p/4420774#M175515</link>
      <description>&lt;P&gt;hi all&lt;/P&gt;&lt;P&gt;i'd like to get&amp;nbsp;latest text value by columns&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;belows are sample datas and result what i want&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;There are comment based on date, time, part, project name.&lt;/P&gt;&lt;P&gt;i want to get latest comment&amp;nbsp;based on date, time, part, project name.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;for example part b has 2 comments in project 1&lt;/P&gt;&lt;P&gt;but 'i solved ptrouble' is latest comment, so&amp;nbsp; part b's project 1 comment is 'i solved ptrouble'&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;i tried several times but failed.&lt;/P&gt;&lt;P&gt;i need help&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;thanks &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 21 Feb 2025 01:02:41 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/get-latest-text-value-by-columns/m-p/4420774#M175515</guid>
      <dc:creator>COU_Alan</dc:creator>
      <dc:date>2025-02-21T01:02:41Z</dc:date>
    </item>
    <item>
      <title>Re: get latest text value by columns</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/get-latest-text-value-by-columns/m-p/4420845#M175519</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="879217" data-lia-user-login="COU_Alan" class="lia-mention lia-mention-user"&gt;COU_Alan&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here's one suggested measure.&lt;/P&gt;
&lt;P&gt;This handles multiple comments at the latest date/time by concatenating them, and excludes blank comments, but you can adjust this logic if needed.&lt;/P&gt;
&lt;P&gt;PBIX attached.&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Latest Comment = 
VAR LatestDateTime =
    CALCULATETABLE (
        TOPN ( 1, SUMMARIZE ( Data, Data[date], Data[time] ), Data[date] + Data[time], DESC ),
        KEEPFILTERS ( NOT ISBLANK ( Data[comment] ) ) -- exclude blank comments
    )
-- Concatenate comments if there are multiple at latest date/time
VAR Comments =
    CALCULATE (
        CONCATENATEX (
            Data,
            Data[comment],
            "|"
        ),
        LatestDateTime
    )
RETURN
    Comments&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 21 Feb 2025 01:48:25 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/get-latest-text-value-by-columns/m-p/4420845#M175519</guid>
      <dc:creator>OwenAuger</dc:creator>
      <dc:date>2025-02-21T01:48:25Z</dc:date>
    </item>
    <item>
      <title>Re: get latest text value by columns</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/get-latest-text-value-by-columns/m-p/4421044#M175526</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="6799" data-lia-user-login="OwenAuger" class="lia-mention lia-mention-user"&gt;OwenAuger&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;can you help one more thing??&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;my final goal is add working hour by day(or week whatever) like upper table in image&lt;/P&gt;&lt;P&gt;but using your dax result is like below&lt;BR /&gt;(I'm not saying that the dax you gave me is wrong, just that it's telling me what's going on.)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;can you help me one more to get result what i want??&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 21 Feb 2025 04:43:10 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/get-latest-text-value-by-columns/m-p/4421044#M175526</guid>
      <dc:creator>COU_Alan</dc:creator>
      <dc:date>2025-02-21T04:43:10Z</dc:date>
    </item>
    <item>
      <title>Re: get latest text value by columns</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/get-latest-text-value-by-columns/m-p/4423405#M175602</link>
      <description>&lt;P&gt;Hi &lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="879217" data-lia-user-login="COU_Alan" class="lia-mention lia-mention-user"&gt;COU_Alan&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;Sure, I can give some suggestions for that. We should set up the model a bit more carefully with Date/Time tables.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Can you show an example of the table containing the numerical values (10, 10, 20, 20 etc)?&lt;/P&gt;
&lt;P&gt;I just want to make sure I give a suggestion consistent with how your data is set up.&lt;/P&gt;</description>
      <pubDate>Sun, 23 Feb 2025 11:00:14 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/get-latest-text-value-by-columns/m-p/4423405#M175602</guid>
      <dc:creator>OwenAuger</dc:creator>
      <dc:date>2025-02-23T11:00:14Z</dc:date>
    </item>
    <item>
      <title>Re: get latest text value by columns</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/get-latest-text-value-by-columns/m-p/4423468#M175607</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="6799" data-lia-user-login="OwenAuger" class="lia-mention lia-mention-user"&gt;OwenAuger&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;i attached sample data and screenshot that i want to retrun&lt;/P&gt;&lt;P&gt;working time = raw * 30&lt;/P&gt;&lt;P&gt;for example W01 part a's project1 has 5 rows so 150(Minutes)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;[raw data]&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;[result]&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;Thank you &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 23 Feb 2025 14:14:54 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/get-latest-text-value-by-columns/m-p/4423468#M175607</guid>
      <dc:creator>COU_Alan</dc:creator>
      <dc:date>2025-02-23T14:14:54Z</dc:date>
    </item>
    <item>
      <title>Re: get latest text value by columns</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/get-latest-text-value-by-columns/m-p/4551063#M175635</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="879217" data-lia-user-login="COU_Alan" class="lia-mention lia-mention-user"&gt;COU_Alan&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It looks like it's easier to treat Latest Comment as a static column, if that meets your requirements.&lt;/P&gt;
&lt;P&gt;Then you can included it as a Row field in a matrix like this:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Latest Comment Column = 
CALCULATE (
    CALCULATE (
        CONCATENATEX ( Data, Data[comment], "|" ),
        TOPN ( 1, SUMMARIZE ( Data, Data[date], Data[time] ), Data[date] + Data[time], DESC )
    ),
    ALLEXCEPT ( Data, Data[part], Data[project_name] )
)&lt;/LI-CODE&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;It's much easier to place "supplementary" columns on the left (if they are static) as Row fields. Placing them on the right requires some adjustments to the model.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Would this work for you?&lt;/P&gt;</description>
      <pubDate>Mon, 24 Feb 2025 22:01:25 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/get-latest-text-value-by-columns/m-p/4551063#M175635</guid>
      <dc:creator>OwenAuger</dc:creator>
      <dc:date>2025-02-24T22:01:25Z</dc:date>
    </item>
  </channel>
</rss>

