<?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 last value from an delimited set of values in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Get-last-value-from-an-delimited-set-of-values/m-p/756167#M3012</link>
    <description>&lt;P&gt;Well, having had a further sniff around....I saw the 'Extract' option - and used that functionality to grab the last value&amp;nbsp;&lt;/P&gt;&lt;P&gt;Also then had to change the data type to a Whole Number&lt;/P&gt;&lt;P&gt;Seems a neat solution&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;img /&gt;&lt;/P&gt;</description>
    <pubDate>Fri, 02 Aug 2019 08:28:17 GMT</pubDate>
    <dc:creator>graemejohnson</dc:creator>
    <dc:date>2019-08-02T08:28:17Z</dc:date>
    <item>
      <title>Get last value from an delimited set of values</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Get-last-value-from-an-delimited-set-of-values/m-p/755418#M2971</link>
      <description>&lt;P&gt;I have a column in a table which contains zero, one or more delimited values.&amp;nbsp; I want to extract value on the right hand side of the last delimiter if there is a delimer...for example the values highlighted in yellow below....&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is tying me up in knots trying to crack it&amp;nbsp;:smileyfrustrated: - please can someone help?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 01 Aug 2019 16:09:37 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Get-last-value-from-an-delimited-set-of-values/m-p/755418#M2971</guid>
      <dc:creator>graemejohnson</dc:creator>
      <dc:date>2019-08-01T16:09:37Z</dc:date>
    </item>
    <item>
      <title>Re: Get last value from an delimited set of values</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Get-last-value-from-an-delimited-set-of-values/m-p/755479#M2972</link>
      <description>Use Power Query for this. Not DAX. DAX is a data analysis language, not data manipulation language. M is.&lt;BR /&gt;&lt;BR /&gt;Best&lt;BR /&gt;Darek</description>
      <pubDate>Thu, 01 Aug 2019 17:11:58 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Get-last-value-from-an-delimited-set-of-values/m-p/755479#M2972</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-08-01T17:11:58Z</dc:date>
    </item>
    <item>
      <title>Re: Get last value from an delimited set of values</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Get-last-value-from-an-delimited-set-of-values/m-p/755483#M2973</link>
      <description>&lt;P&gt;This type of thing is much easier in Power Query in my view. Assuming that's an option:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;1.&amp;nbsp; Add a custom column that will give you&amp;nbsp; the position of the last delimiter&lt;/P&gt;&lt;PRE&gt;Text.PositionOfAny([Column1],{","}, Occurrence.Last)&lt;/PRE&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;2. Custom column to get the text lenght of Column 1&lt;/P&gt;&lt;PRE&gt;Text.Length([Column1])&lt;/PRE&gt;&lt;P&gt;3. Final custom column to get the value of the last delimited value&lt;/P&gt;&lt;PRE&gt;if
[Position of Last Delimiter] &amp;lt; 0
then 
[Column1]
else Text.End([Column1],([Text Length]-[Position of Last Delimiter]-1)
)&lt;/PRE&gt;&lt;P&gt;Basically it's saying that is the position of last delimiter is negative (which means there is no delimiter) then give the value in that row. Else, start at the end of values in the current row, and go back to you find the first delimiter (which would be the last delimiter)&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Final Table:&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You could easily combine #1 and #2 into one step, but left them on here to show the idea.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 01 Aug 2019 17:12:48 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Get-last-value-from-an-delimited-set-of-values/m-p/755483#M2973</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-08-01T17:12:48Z</dc:date>
    </item>
    <item>
      <title>Re: Get last value from an delimited set of values</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Get-last-value-from-an-delimited-set-of-values/m-p/756167#M3012</link>
      <description>&lt;P&gt;Well, having had a further sniff around....I saw the 'Extract' option - and used that functionality to grab the last value&amp;nbsp;&lt;/P&gt;&lt;P&gt;Also then had to change the data type to a Whole Number&lt;/P&gt;&lt;P&gt;Seems a neat solution&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;img /&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 02 Aug 2019 08:28:17 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Get-last-value-from-an-delimited-set-of-values/m-p/756167#M3012</guid>
      <dc:creator>graemejohnson</dc:creator>
      <dc:date>2019-08-02T08:28:17Z</dc:date>
    </item>
  </channel>
</rss>

