<?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 a single value per &amp;quot;group in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Get-a-single-value-per-quot-group/m-p/1228434#M20008</link>
    <description>Not enough details to tell you how to solve this.&lt;BR /&gt;&lt;BR /&gt;Best&lt;BR /&gt;D</description>
    <pubDate>Thu, 16 Jul 2020 14:06:05 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2020-07-16T14:06:05Z</dc:date>
    <item>
      <title>Get a single value per "group</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Get-a-single-value-per-quot-group/m-p/1228337#M19997</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have writen a DAX query, that I'm using as a dataset in a SSRS Report, but I'm having troubles figuring out how to "identify" or get a only once from the returned dataset.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The query looks like this -&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;DEFINE&lt;BR /&gt;VAR vCurrentDate = "06-07-2020"-&lt;BR /&gt;VAR vReportDate = CALCULATE ( MAX ( 'Date'[Date]), 'Date'[Date] = DateValue(vCurrentDate)-1 )&lt;BR /&gt;VAR vReportMonthYear =CALCULATE ( MAX ( 'Date'[Month-Year] ), 'Date'[Date] = vReportDate )&lt;/P&gt;&lt;P&gt;EVALUATE&lt;BR /&gt;SUMMARIZECOLUMNS (&lt;BR /&gt;'Route'[Route Name],&lt;BR /&gt;'Product'[Product Name],&lt;BR /&gt;'Date'[Date],&lt;BR /&gt;FILTER ( VALUES ( 'Date'[Month-Year] ), ( 'Date'[Month-Year] = vReportMonthYear ) ),&lt;BR /&gt;"Quantity1", [Quantity1],&lt;BR /&gt;"Quantity2", [Quantity2]&lt;BR /&gt;)&lt;BR /&gt;ORDER BY 'Date'[Date] ,'Route'[Route Name]&lt;/P&gt;&lt;P&gt;(Actually it's more complex than this but this should be enough to illustrate the issue)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;and the (simplified) dataset I get back is this -&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Route Product Date&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Quantity1 Quantity2&lt;BR /&gt;X&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;CC&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 01-07-2020 581&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;18&lt;BR /&gt;X&amp;nbsp; &amp;nbsp; &amp;nbsp; CA&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;01-07-2020 558&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;18&lt;BR /&gt;X&amp;nbsp; &amp;nbsp; &amp;nbsp; BU&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 01-07-2020 2&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 18&lt;BR /&gt;X&amp;nbsp; &amp;nbsp; &amp;nbsp; PA&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 01-07-2020&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;18&lt;BR /&gt;Y&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;CC&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;01-07-2020 2317&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;80&lt;BR /&gt;Y&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;FPA&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 01-07-2020&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;80&lt;BR /&gt;Y&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;BU&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;01-07-2020 2&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 80&lt;BR /&gt;Y&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;CA&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;01-07-2020 1840&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 80&lt;/P&gt;&lt;DIV class="mceNonEditable lia-copypaste-placeholder"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="mceNonEditable lia-copypaste-placeholder"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;P&gt;My problem, is then that I have a&amp;nbsp;Matrix in my SSRS Report ,where I need to show the sum of Quantity2 for the month, but this gives me a too high a number because the same value apperas several times for each day/Route and not only once. I think I need either a sort of a "ROWNUMBER" for each record per day/Route so I can select only the one with e.g. RowNumber 1 or a way to extend my query, so I get a new row with only the value of Quantity2 as a new column , that I can sum.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have been around many ideas about RANKX, creating rownumbers using EARLIER function etc, but no of it really seems to be work so now I'm a little bit out if ideas.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Does anyone of you have som ideas on how to solve the problem?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Steen&lt;/P&gt;</description>
      <pubDate>Thu, 16 Jul 2020 13:40:44 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Get-a-single-value-per-quot-group/m-p/1228337#M19997</guid>
      <dc:creator>steen_p</dc:creator>
      <dc:date>2020-07-16T13:40:44Z</dc:date>
    </item>
    <item>
      <title>Re: Get a single value per "group</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Get-a-single-value-per-quot-group/m-p/1228434#M20008</link>
      <description>Not enough details to tell you how to solve this.&lt;BR /&gt;&lt;BR /&gt;Best&lt;BR /&gt;D</description>
      <pubDate>Thu, 16 Jul 2020 14:06:05 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Get-a-single-value-per-quot-group/m-p/1228434#M20008</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-07-16T14:06:05Z</dc:date>
    </item>
    <item>
      <title>Re: Get a single value per "group</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Get-a-single-value-per-quot-group/m-p/1228499#M20012</link>
      <description>&lt;P&gt;hmmm...maybe not, but which details do you need then?&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm just looking for some tips and ideas that I can work on - not neccessarily a fixed solution.&lt;/P&gt;</description>
      <pubDate>Thu, 16 Jul 2020 14:28:15 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Get-a-single-value-per-quot-group/m-p/1228499#M20012</guid>
      <dc:creator>steen_p</dc:creator>
      <dc:date>2020-07-16T14:28:15Z</dc:date>
    </item>
  </channel>
</rss>

