<?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: How to take Max String value based on Another Column which contains same values. in Power Query</title>
    <link>https://community.fabric.microsoft.com/t5/Power-Query/How-to-take-Max-String-value-based-on-Another-Column-which/m-p/4333141#M143409</link>
    <description>&lt;P&gt;I cannot reproduce your issue with the code I have provided and the examples you have provided. As you can see, the results show &lt;STRONG&gt;&lt;EM&gt;SMAR-2363&amp;nbsp; -&amp;nbsp; SFP.R.11.8&lt;/EM&gt;&lt;/STRONG&gt; which you have noted is correct:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Version Table:&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;Issue IDFixVersion&lt;/P&gt;
&lt;TABLE&gt;
&lt;THEAD&gt;&lt;/THEAD&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD&gt;1&lt;/TD&gt;
&lt;TD&gt;SFP.R.11.8&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;2&lt;/TD&gt;
&lt;TD&gt;SFP.R.11.7&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;2&lt;/TD&gt;
&lt;TD&gt;SFP.R.11.8&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;2&lt;/TD&gt;
&lt;TD&gt;SFP.R.11.9&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;3&lt;/TD&gt;
&lt;TD&gt;SFP.R.11.7&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;3&lt;/TD&gt;
&lt;TD&gt;SFP.R.11.8&lt;/TD&g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&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;let
    Source = VersionTable,

//Split digit and letter parts
    #"Split" = Table.AddColumn(Source, "SplitParts", each
        let 
            split = Text.Split([FixVersion],"."),
            letter = Text.Combine(List.Range(split,0,2),"."),
            digits = Number.From(split{2})*1000 + Number.From(split{3})
        in 
            [letters=letter, digits=digits],
            type [letters=text, digits=Int64.Type]),
   
    #"Expanded SplitParts" = Table.ExpandRecordColumn(Split, "SplitParts", {"letters", "digits"}, {"letters", "digits"}),
    #"Grouped Rows" = Table.Group(#"Expanded SplitParts", {"Issue ID"}, {
        
        {"Latest Version", each Table.Last(Table.Sort(_, {{"letters", Order.Ascending}, {"digits", Order.Ascending}}))
        
        
        , type [Issue ID=any, FixVersion=text, letters=text, digits=number]}}),
    #"Expanded Latest Version" = Table.ExpandRecordColumn(#"Grouped Rows", "Latest Version", {"FixVersion"},{"MaxVersion"})
in
    #"Expanded Latest Version"&lt;/LI-CODE&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;
&lt;P&gt;&lt;STRONG&gt;Results:&lt;/STRONG&gt;&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;</description>
    <pubDate>Tue, 17 Dec 2024 13:34:57 GMT</pubDate>
    <dc:creator>ronrsnfld</dc:creator>
    <dc:date>2024-12-17T13:34:57Z</dc:date>
    <item>
      <title>How to take Max String value based on Another Column which contains same values.</title>
      <link>https://community.fabric.microsoft.com/t5/Power-Query/How-to-take-Max-String-value-based-on-Another-Column-which/m-p/4321676#M143042</link>
      <description>&lt;P&gt;Hi Team,&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;Here based on the Isssue Id column we need to fetch max value of Fixversion and remove Other records.&lt;/P&gt;&lt;P&gt;Description: Issue ID - 2 is having multiple FixVersions ( SFP.R.11.7, SFP.R.11.8 &amp;amp;&amp;nbsp;SFP.R.11.9 ), but i want to fetch only one record for each Issue ID with Max FixVersion like below&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;</description>
      <pubDate>Tue, 10 Dec 2024 13:17:16 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Power-Query/How-to-take-Max-String-value-based-on-Another-Column-which/m-p/4321676#M143042</guid>
      <dc:creator>KR300</dc:creator>
      <dc:date>2024-12-10T13:17:16Z</dc:date>
    </item>
    <item>
      <title>Re: How to take Max String value based on Another Column which contains same values.</title>
      <link>https://community.fabric.microsoft.com/t5/Power-Query/How-to-take-Max-String-value-based-on-Another-Column-which/m-p/4321835#M143045</link>
      <description>&lt;P&gt;pls try this code&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;let
    Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WMlTSUQp2C9AL0jM01LNQitWJVjJCFjLHFMKiyhIsZIyp0RhTozEBjYYGSrGxAA==", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [#"Issue ID" = _t, FixVersion = _t]),
    #"Changed Type" = Table.TransformColumnTypes(Source,{{"Issue ID", Int64.Type}, {"FixVersion", type text}}),
    #"Removed Duplicates" = Table.Distinct(#"Changed Type", {"FixVersion"}),
    #"Grouped Rows" = Table.Group(#"Removed Duplicates", {"Issue ID"}, {{"Count", each List.Max([FixVersion]), type nullable text}})
in
    #"Grouped Rows"&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 10 Dec 2024 13:47:22 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Power-Query/How-to-take-Max-String-value-based-on-Another-Column-which/m-p/4321835#M143045</guid>
      <dc:creator>Ahmedx</dc:creator>
      <dc:date>2024-12-10T13:47:22Z</dc:date>
    </item>
    <item>
      <title>Re: How to take Max String value based on Another Column which contains same values.</title>
      <link>https://community.fabric.microsoft.com/t5/Power-Query/How-to-take-Max-String-value-based-on-Another-Column-which/m-p/4321875#M143046</link>
      <description>&lt;UL&gt;
&lt;LI&gt;Split the version into the letters and digits portion&lt;/LI&gt;
&lt;LI&gt;Split the digits portion by the dot, then combine them to create a whole number&lt;/LI&gt;
&lt;LI&gt;Group by Issue ID&lt;/LI&gt;
&lt;LI&gt;Sort each group by letter and digits&lt;/LI&gt;
&lt;LI&gt;Return the last value of each subgroup&lt;/LI&gt;
&lt;/UL&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;LI-CODE lang="markup"&gt;let
    Source = Table.FromColumns({
        {1,2,2,2,3,3,3,3},
        {"SFP.R.11.8","SFP.R.11.7","SFP.R.11.8","SFP.R.11.9","SFP.R.11.7","SFP.R.11.8","SFP.R.11.9","SFP.R.11.10"}},
                type table[Issue ID=Int64.Type, FixVersion=text]),

//Split digit and letter parts
    #"Split" = Table.AddColumn(Source, "SplitParts", each
        let 
            split = Text.Split([FixVersion],"."),
            letter = Text.Combine(List.Range(split,0,2),"."),
            digits = Number.From(split{2})*1000 + Number.From(split{3})
        in 
            [letters=letter, digits=digits],
            type [letters=text, digits=Int64.Type]),
   
    #"Expanded SplitParts" = Table.ExpandRecordColumn(Split, "SplitParts", {"letters", "digits"}, {"letters", "digits"}),
    #"Grouped Rows" = Table.Group(#"Expanded SplitParts", {"Issue ID"}, {
        
        {"Latest Version", each Table.Last(Table.Sort(_, {{"letters", Order.Ascending}, {"digits", Order.Ascending}}))
        
        
        , type [Issue ID=number, FixVersion=text, letters=text, digits=number]}}),
    #"Expanded Latest Version" = Table.ExpandRecordColumn(#"Grouped Rows", "Latest Version", {"FixVersion"})
in
    #"Expanded Latest Version"&lt;/LI-CODE&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>Tue, 10 Dec 2024 14:01:02 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Power-Query/How-to-take-Max-String-value-based-on-Another-Column-which/m-p/4321875#M143046</guid>
      <dc:creator>ronrsnfld</dc:creator>
      <dc:date>2024-12-10T14:01:02Z</dc:date>
    </item>
    <item>
      <title>Re: How to take Max String value based on Another Column which contains same values.</title>
      <link>https://community.fabric.microsoft.com/t5/Power-Query/How-to-take-Max-String-value-based-on-Another-Column-which/m-p/4322391#M143065</link>
      <description>&lt;P&gt;.......&lt;/P&gt;</description>
      <pubDate>Wed, 11 Dec 2024 12:27:51 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Power-Query/How-to-take-Max-String-value-based-on-Another-Column-which/m-p/4322391#M143065</guid>
      <dc:creator>ThxAlot</dc:creator>
      <dc:date>2024-12-11T12:27:51Z</dc:date>
    </item>
    <item>
      <title>Re: How to take Max String value based on Another Column which contains same values.</title>
      <link>https://community.fabric.microsoft.com/t5/Power-Query/How-to-take-Max-String-value-based-on-Another-Column-which/m-p/4322417#M143066</link>
      <description>&lt;P&gt;With your algorithm, if I add&amp;nbsp;&amp;nbsp;&lt;STRONG&gt;SFP.R.10.22&lt;/STRONG&gt;&amp;nbsp;to ID3, it gets returned as the latest version vs&amp;nbsp;&lt;STRONG&gt;SFP.R.11.10&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 10 Dec 2024 20:14:44 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Power-Query/How-to-take-Max-String-value-based-on-Another-Column-which/m-p/4322417#M143066</guid>
      <dc:creator>ronrsnfld</dc:creator>
      <dc:date>2024-12-10T20:14:44Z</dc:date>
    </item>
    <item>
      <title>Re: How to take Max String value based on Another Column which contains same values.</title>
      <link>https://community.fabric.microsoft.com/t5/Power-Query/How-to-take-Max-String-value-based-on-Another-Column-which/m-p/4323328#M143091</link>
      <description>&lt;P&gt;Hi it helps. But If we&amp;nbsp;&lt;STRONG&gt;have some more data like in the screenshot&lt;/STRONG&gt;. Pls have a look.&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;I need more help on this &amp;amp; how it can be done.&lt;/LI&gt;&lt;LI&gt;If Issue ID is same, I want only one Issue ID with Max FixVersion Record&lt;/LI&gt;&lt;LI&gt;Note: FixVersion from Least to Highest ( 8.1,8.2,....,8.10,8.11, 8.12..,&amp;nbsp; &amp;nbsp;11.1, 11.2,....,11.10, 11.11, 11.12.., )&lt;/LI&gt;&lt;LI&gt;&lt;img /&gt;&lt;/LI&gt;&lt;/OL&gt;</description>
      <pubDate>Wed, 11 Dec 2024 08:30:17 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Power-Query/How-to-take-Max-String-value-based-on-Another-Column-which/m-p/4323328#M143091</guid>
      <dc:creator>KR300</dc:creator>
      <dc:date>2024-12-11T08:30:17Z</dc:date>
    </item>
    <item>
      <title>Re: How to take Max String value based on Another Column which contains same values.</title>
      <link>https://community.fabric.microsoft.com/t5/Power-Query/How-to-take-Max-String-value-based-on-Another-Column-which/m-p/4323510#M143098</link>
      <description>&lt;P&gt;I have entere some more data. How to do in this case&lt;img /&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 11 Dec 2024 09:53:50 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Power-Query/How-to-take-Max-String-value-based-on-Another-Column-which/m-p/4323510#M143098</guid>
      <dc:creator>KR300</dc:creator>
      <dc:date>2024-12-11T09:53:50Z</dc:date>
    </item>
    <item>
      <title>Re: How to take Max String value based on Another Column which contains same values.</title>
      <link>https://community.fabric.microsoft.com/t5/Power-Query/How-to-take-Max-String-value-based-on-Another-Column-which/m-p/4323856#M143107</link>
      <description>&lt;P&gt;Hey!&lt;BR /&gt;&lt;BR /&gt;You can try an variation on this code. Som additional code may be needed to clean your data before.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;The code below code does the following:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;use a custom function to create a numeric combined value from main and sub version.&lt;/LI&gt;&lt;LI&gt;Group the rows on issue to get the max&lt;/LI&gt;&lt;LI&gt;Filter the rows so only the value that equals max will remain.&amp;nbsp;&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;let
    Source = YOURDATA,
    filterEmpty = Table.SelectRows(Source, each [FixVersion] &amp;lt;&amp;gt; null and [FixVersion] &amp;lt;&amp;gt; ""),

    fn_VersionCombined = (vVersion as text) =&amp;gt;
    let
        split = Text.Split(vVersion, "."),
        main = split{2},
        sub = split{3},
        outcome  = Number.From(Text.Combine({main, if Number.From(sub) &amp;lt;= 9 then "0" &amp;amp; sub else sub}))
    in
        outcome,
    
    invoke_fnVersionCombined = Table.AddColumn(filterEmpty, "VersionCombined", each fn_VersionCombined([FixVersion]), Int64.Type),
    GroupRows = Table.Group(invoke_fnVersionCombined, {"Issue ID"}, {{"Max", each List.Max([VersionCombined]), type number}, {"Table", each _, type table [Issue ID=nullable number, FixVersion=nullable text, VersionCombined=number]}}),
    ExpandTable = Table.ExpandTableColumn(GroupRows, "Table", {"FixVersion", "VersionCombined"}, {"FixVersion", "VersionCombined"}),
    FilterRows = Table.SelectRows(ExpandTable, each ([VersionCombined] = [Max]))
    
in
    FilterRows&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hopefully this is usefull, if so consider accepting it as a solution to help other users!&lt;BR /&gt;&lt;BR /&gt;Good luck!&lt;/P&gt;</description>
      <pubDate>Wed, 11 Dec 2024 12:42:39 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Power-Query/How-to-take-Max-String-value-based-on-Another-Column-which/m-p/4323856#M143107</guid>
      <dc:creator>Chewdata</dc:creator>
      <dc:date>2024-12-11T12:42:39Z</dc:date>
    </item>
    <item>
      <title>Re: How to take Max String value based on Another Column which contains same values.</title>
      <link>https://community.fabric.microsoft.com/t5/Power-Query/How-to-take-Max-String-value-based-on-Another-Column-which/m-p/4323907#M143108</link>
      <description>&lt;P&gt;The code I supplied earlier seems to work with your new sample:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Source&lt;/STRONG&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;&lt;STRONG&gt;Results&lt;/STRONG&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;By the way, if you want to change the name of the resultant column, merely edit the last line of code before the "&lt;STRONG&gt;in&lt;/STRONG&gt;":&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Change:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Table.ExpandRecordColumn(#"Grouped Rows", "Latest Version", {"FixVersion"})&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;to something like:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Table.ExpandRecordColumn(#"Grouped Rows", "Latest Version", {"FixVersion"},{"MaxVersion"})&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 11 Dec 2024 13:12:15 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Power-Query/How-to-take-Max-String-value-based-on-Another-Column-which/m-p/4323907#M143108</guid>
      <dc:creator>ronrsnfld</dc:creator>
      <dc:date>2024-12-11T13:12:15Z</dc:date>
    </item>
    <item>
      <title>Re: How to take Max String value based on Another Column which contains same values.</title>
      <link>https://community.fabric.microsoft.com/t5/Power-Query/How-to-take-Max-String-value-based-on-Another-Column-which/m-p/4324790#M143129</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;Thanks for the solution&amp;nbsp;KR300&amp;nbsp;,&amp;nbsp;Chewdata&amp;nbsp;,&amp;nbsp;ThxAlot&amp;nbsp; and&amp;nbsp;Ahmedx&amp;nbsp; offered, and i want to offer some more information for user to refer to.&lt;/P&gt;
&lt;P&gt;hello&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="396793" data-lia-user-login="KR300" class="lia-mention lia-mention-user"&gt;KR300&lt;/a&gt;&amp;nbsp;, you can refer to the follwing code in advanced editor in power query.&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;let
    Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("bdBLCsAgDATQu2QtwbEf9QJdF7sU73+NfrDUMtk+EoaZWgXi5Nh2LQpokuaqhJHiQIWviu435YemkSJTYjIe4R+b+XNhWpkiU2LKTFcwGwwLhhlFYVTA1yH38j/q5QeDVxgWyN7JYcz0N8rtq7cT", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [#"Issue ID" = _t, FixVersion = _t]),
    #"Changed Type" = Table.TransformColumnTypes(Source,{{"Issue ID", Int64.Type}, {"FixVersion", type text}}),
    #"Added Custom" = Table.AddColumn(#"Changed Type", "Custom", each Text.Select([FixVersion],{"0".."9"})),
    #"Changed Type1" = Table.TransformColumnTypes(#"Added Custom",{{"Custom", type number}}),
    #"Grouped Rows" = Table.Group(#"Changed Type1", {"Issue ID"}, {{"Max", each let a=List.Max([Custom])
in List.Select([FixVersion],each Text.Contains(Text.Remove(_,"."),Text.From(a))){0}, type nullable text}})
in
    #"Grouped Rows"&lt;/LI-CODE&gt;
&lt;P&gt;Ouptut&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards!&lt;/P&gt;
&lt;P&gt;Yolo Zhu&lt;/P&gt;
&lt;P&gt;If this post&amp;nbsp;&lt;STRONG&gt;&lt;EM&gt;helps&lt;/EM&gt;&lt;/STRONG&gt;, then please consider&amp;nbsp;&lt;STRONG&gt;&lt;EM&gt;Accept it as the solution&lt;/EM&gt;&lt;/STRONG&gt;&amp;nbsp;to help the other members find it more quickly.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 12 Dec 2024 02:03:16 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Power-Query/How-to-take-Max-String-value-based-on-Another-Column-which/m-p/4324790#M143129</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-12-12T02:03:16Z</dc:date>
    </item>
    <item>
      <title>Re: How to take Max String value based on Another Column which contains same values.</title>
      <link>https://community.fabric.microsoft.com/t5/Power-Query/How-to-take-Max-String-value-based-on-Another-Column-which/m-p/4325137#M143136</link>
      <description>&lt;P&gt;But Power BI Consider SFP.R.8.9 as max string Compared to SFP.R.11.8 ( but this is the newest version right and Max Stiring). See Key -&amp;gt; SMAR-2363&lt;/P&gt;</description>
      <pubDate>Thu, 12 Dec 2024 06:04:27 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Power-Query/How-to-take-Max-String-value-based-on-Another-Column-which/m-p/4325137#M143136</guid>
      <dc:creator>KR300</dc:creator>
      <dc:date>2024-12-12T06:04:27Z</dc:date>
    </item>
    <item>
      <title>Re: How to take Max String value based on Another Column which contains same values.</title>
      <link>https://community.fabric.microsoft.com/t5/Power-Query/How-to-take-Max-String-value-based-on-Another-Column-which/m-p/4325759#M143149</link>
      <description>&lt;P&gt;Hey,&lt;BR /&gt;Have you tried my solution yet? It should do just that. Same as the other solutions. Otherwise the problem you are facing is not yet clear to us.&lt;/P&gt;</description>
      <pubDate>Thu, 12 Dec 2024 10:57:31 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Power-Query/How-to-take-Max-String-value-based-on-Another-Column-which/m-p/4325759#M143149</guid>
      <dc:creator>Chewdata</dc:creator>
      <dc:date>2024-12-12T10:57:31Z</dc:date>
    </item>
    <item>
      <title>Re: How to take Max String value based on Another Column which contains same values.</title>
      <link>https://community.fabric.microsoft.com/t5/Power-Query/How-to-take-Max-String-value-based-on-Another-Column-which/m-p/4325985#M143156</link>
      <description>&lt;LI-CODE lang="markup"&gt;let
    result = Table.Group(
        source_table, 
        "Issue ID", 
        {
            "FixVersion", (x) =&amp;gt; List.Max(
                x[FixVersion], 
                null, 
                (w) =&amp;gt; ((nums) =&amp;gt; Number.From(nums{0}) * 1000 + 
                    Number.From(nums{1})
                )(List.LastN(Text.Split(w, "."), 2))
            )
        }
    )
in
    result&lt;/LI-CODE&gt;</description>
      <pubDate>Thu, 12 Dec 2024 13:12:12 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Power-Query/How-to-take-Max-String-value-based-on-Another-Column-which/m-p/4325985#M143156</guid>
      <dc:creator>AlienSx</dc:creator>
      <dc:date>2024-12-12T13:12:12Z</dc:date>
    </item>
    <item>
      <title>Re: How to take Max String value based on Another Column which contains same values.</title>
      <link>https://community.fabric.microsoft.com/t5/Power-Query/How-to-take-Max-String-value-based-on-Another-Column-which/m-p/4325993#M143157</link>
      <description>&lt;P&gt;I don't understand your two comments.&lt;/P&gt;
&lt;P&gt;Version SFP.R.11.8&amp;nbsp; is a later version than SFP.R.8.9 and my code reports it as such.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Also, in your example, there is no column labeled "Key" and no entry SMAR-2363 so I have no idea what you are referring to.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please clarify both points.&lt;/P&gt;</description>
      <pubDate>Thu, 12 Dec 2024 13:14:54 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Power-Query/How-to-take-Max-String-value-based-on-Another-Column-which/m-p/4325993#M143157</guid>
      <dc:creator>ronrsnfld</dc:creator>
      <dc:date>2024-12-12T13:14:54Z</dc:date>
    </item>
    <item>
      <title>Re: How to take Max String value based on Another Column which contains same values.</title>
      <link>https://community.fabric.microsoft.com/t5/Power-Query/How-to-take-Max-String-value-based-on-Another-Column-which/m-p/4332838#M143394</link>
      <description>&lt;P&gt;Order of the FixVersion as shown in the below&lt;/P&gt;&lt;P&gt;SFP.R.8.1 ( starting )&lt;/P&gt;&lt;P&gt;SFP.R.8.2&lt;/P&gt;&lt;P&gt;..&lt;/P&gt;&lt;P&gt;..&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;SFP.R.8.10&lt;/P&gt;&lt;P&gt;SFP.R.8.11&lt;/P&gt;&lt;P&gt;SFP.R.9.1&lt;/P&gt;&lt;P&gt;SFP.R.9.2&lt;/P&gt;&lt;P&gt;..&lt;/P&gt;&lt;P&gt;..&lt;/P&gt;&lt;P&gt;SFP.R.9.10&lt;/P&gt;&lt;P&gt;SFP.R.9.11&lt;/P&gt;&lt;P&gt;Silimary&lt;/P&gt;&lt;P&gt;....&lt;/P&gt;&lt;P&gt;SFP.R.11.8&lt;/P&gt;&lt;P&gt;SFP.R.11.9&lt;/P&gt;&lt;P&gt;SFP.R.11.10&lt;/P&gt;&lt;P&gt;SFP.R.11.11 ( Latest )&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Key/Issue ID /ID&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; FixVersion&lt;/P&gt;&lt;P&gt;SMAR-2363&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; SFP.R.11.8&amp;nbsp;&lt;/P&gt;&lt;P&gt;SMAR-2363&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; SFP.R.8.9&lt;/P&gt;&lt;P&gt;SMAR-2363&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; SFP.R.9.9&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But,for the SMAR-2363&amp;nbsp;Power BI is taking Maxstring SFP.R.&lt;STRONG&gt;9&lt;/STRONG&gt;.9 Actually the correct/latest one is&amp;nbsp;SFP.R.&lt;STRONG&gt;1&lt;/STRONG&gt;1.8&lt;/P&gt;&lt;P&gt;( i think based on ordering of the values &lt;STRONG&gt;9&lt;/STRONG&gt; &amp;gt; &lt;STRONG&gt;1&lt;/STRONG&gt; highlighted , so taking&amp;nbsp;SFP.R.&lt;STRONG&gt;9&lt;/STRONG&gt;.9 for the SMAR-2363 - but this is wrong ).&lt;/P&gt;</description>
      <pubDate>Tue, 17 Dec 2024 10:30:46 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Power-Query/How-to-take-Max-String-value-based-on-Another-Column-which/m-p/4332838#M143394</guid>
      <dc:creator>KR300</dc:creator>
      <dc:date>2024-12-17T10:30:46Z</dc:date>
    </item>
    <item>
      <title>Re: How to take Max String value based on Another Column which contains same values.</title>
      <link>https://community.fabric.microsoft.com/t5/Power-Query/How-to-take-Max-String-value-based-on-Another-Column-which/m-p/4332845#M143395</link>
      <description>&lt;P&gt;Hi All, A lot of thanks for everyone. I will try what is the best way of workaround from all above options &amp;amp; Reply to all&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 17 Dec 2024 10:33:45 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Power-Query/How-to-take-Max-String-value-based-on-Another-Column-which/m-p/4332845#M143395</guid>
      <dc:creator>KR300</dc:creator>
      <dc:date>2024-12-17T10:33:45Z</dc:date>
    </item>
    <item>
      <title>Re: How to take Max String value based on Another Column which contains same values.</title>
      <link>https://community.fabric.microsoft.com/t5/Power-Query/How-to-take-Max-String-value-based-on-Another-Column-which/m-p/4333141#M143409</link>
      <description>&lt;P&gt;I cannot reproduce your issue with the code I have provided and the examples you have provided. As you can see, the results show &lt;STRONG&gt;&lt;EM&gt;SMAR-2363&amp;nbsp; -&amp;nbsp; SFP.R.11.8&lt;/EM&gt;&lt;/STRONG&gt; which you have noted is correct:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Version Table:&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;Issue IDFixVersion&lt;/P&gt;
&lt;TABLE&gt;
&lt;THEAD&gt;&lt;/THEAD&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD&gt;1&lt;/TD&gt;
&lt;TD&gt;SFP.R.11.8&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;2&lt;/TD&gt;
&lt;TD&gt;SFP.R.11.7&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;2&lt;/TD&gt;
&lt;TD&gt;SFP.R.11.8&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;2&lt;/TD&gt;
&lt;TD&gt;SFP.R.11.9&lt;/TD&gt;
&lt;/TR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&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Code: &lt;/STRONG&gt;&lt;EM&gt;(altered only to change version column name to `MaxVersion`, and Issue ID column type to `any`)&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;let
    Source = VersionTable,

//Split digit and letter parts
    #"Split" = Table.AddColumn(Source, "SplitParts", each
        let 
            split = Text.Split([FixVersion],"."),
            letter = Text.Combine(List.Range(split,0,2),"."),
            digits = Number.From(split{2})*1000 + Number.From(split{3})
        in 
            [letters=letter, digits=digits],
            type [letters=text, digits=Int64.Type]),
   
    #"Expanded SplitParts" = Table.ExpandRecordColumn(Split, "SplitParts", {"letters", "digits"}, {"letters", "digits"}),
    #"Grouped Rows" = Table.Group(#"Expanded SplitParts", {"Issue ID"}, {
        
        {"Latest Version", each Table.Last(Table.Sort(_, {{"letters", Order.Ascending}, {"digits", Order.Ascending}}))
        
        
        , type [Issue ID=any, FixVersion=text, letters=text, digits=number]}}),
    #"Expanded Latest Version" = Table.ExpandRecordColumn(#"Grouped Rows", "Latest Version", {"FixVersion"},{"MaxVersion"})
in
    #"Expanded Latest Version"&lt;/LI-CODE&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;
&lt;P&gt;&lt;STRONG&gt;Results:&lt;/STRONG&gt;&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;</description>
      <pubDate>Tue, 17 Dec 2024 13:34:57 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Power-Query/How-to-take-Max-String-value-based-on-Another-Column-which/m-p/4333141#M143409</guid>
      <dc:creator>ronrsnfld</dc:creator>
      <dc:date>2024-12-17T13:34:57Z</dc:date>
    </item>
  </channel>
</rss>

