<?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: Summarise Non Unique Values in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Summarise-Non-Unique-Values/m-p/3111297#M109910</link>
    <description>&lt;P&gt;use DISTINCT()&lt;/P&gt;</description>
    <pubDate>Sat, 04 Mar 2023 01:33:16 GMT</pubDate>
    <dc:creator>lbendlin</dc:creator>
    <dc:date>2023-03-04T01:33:16Z</dc:date>
    <item>
      <title>Summarise Non Unique Values</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Summarise-Non-Unique-Values/m-p/3107671#M109652</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a problem that I hope someone will be able to help me with.&lt;/P&gt;&lt;P&gt;I need to summarise a table containing the Customer Name, Order Number, Stock Reference, Cost Price, Sale Price, and Margin Percentage.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If the Cost Price and the Sale Price are identical and there are multiple rows for the order I want to summarise it into one row by Order number.&amp;nbsp; Here is a data example:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;Customer Name&lt;/TD&gt;&lt;TD&gt;Order Number&lt;/TD&gt;&lt;TD&gt;Stock Reference&lt;/TD&gt;&lt;TD&gt;Cost Price&lt;/TD&gt;&lt;TD&gt;Sale Price&lt;/TD&gt;&lt;TD&gt;Margin %&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;AB Smith&lt;/TD&gt;&lt;TD&gt;2354&lt;/TD&gt;&lt;TD&gt;KPCB_14768&lt;/TD&gt;&lt;TD&gt;15&lt;/TD&gt;&lt;TD&gt;36.37&lt;/TD&gt;&lt;TD&gt;58.76&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;AB Smith&lt;/TD&gt;&lt;TD&gt;2354&lt;/TD&gt;&lt;TD&gt;KPCB_14768&lt;/TD&gt;&lt;TD&gt;15&lt;/TD&gt;&lt;TD&gt;36.37&lt;/TD&gt;&lt;TD&gt;58.76&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However if there is an order that has multiple rows but different Cost/Sale Prices I don't want to summarise that data.&amp;nbsp; Here is an example:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;Customer Name&lt;/TD&gt;&lt;TD&gt;Order Number&lt;/TD&gt;&lt;TD&gt;Stock Reference&lt;/TD&gt;&lt;TD&gt;Cost Price&lt;/TD&gt;&lt;TD&gt;Sale Price&lt;/TD&gt;&lt;TD&gt;Margin %&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;T K Anderson&lt;/TD&gt;&lt;TD&gt;2355&lt;/TD&gt;&lt;TD&gt;BS10_54674&lt;/TD&gt;&lt;TD&gt;17.5&lt;/TD&gt;&lt;TD&gt;32.96&lt;/TD&gt;&lt;TD&gt;54.49&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;TK Anderson&lt;/TD&gt;&lt;TD&gt;2355&lt;/TD&gt;&lt;TD&gt;BS09_34889&lt;/TD&gt;&lt;TD&gt;19&lt;/TD&gt;&lt;TD&gt;40&lt;/TD&gt;&lt;TD&gt;52.5&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I hope this makes sense.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for your help,&lt;/P&gt;&lt;P&gt;Greg.&lt;/P&gt;</description>
      <pubDate>Thu, 02 Mar 2023 11:34:13 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Summarise-Non-Unique-Values/m-p/3107671#M109652</guid>
      <dc:creator>grega</dc:creator>
      <dc:date>2023-03-02T11:34:13Z</dc:date>
    </item>
    <item>
      <title>Re: Summarise Non Unique Values</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Summarise-Non-Unique-Values/m-p/3111297#M109910</link>
      <description>&lt;P&gt;use DISTINCT()&lt;/P&gt;</description>
      <pubDate>Sat, 04 Mar 2023 01:33:16 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Summarise-Non-Unique-Values/m-p/3111297#M109910</guid>
      <dc:creator>lbendlin</dc:creator>
      <dc:date>2023-03-04T01:33:16Z</dc:date>
    </item>
    <item>
      <title>Re: Summarise Non Unique Values</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Summarise-Non-Unique-Values/m-p/3111364#M109919</link>
      <description>&lt;P&gt;hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="522666" data-lia-user-login="grega" class="lia-mention lia-mention-user"&gt;grega&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;not sure what column do you want to summarize. Let me suppose you want the general Margin%, then try like:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Margin% = 
VAR _table = 
    SUMMARIZE(
        TableName,
        TableName[Customer Name],
        TableName[Order Number],
        TableName[Stock Reference],
        TableName[Cost Price],
        TableName[Sale Price]
    )
RETURN
1 - 
DIVIDE(
    SUMX(_table, TableName[Cost Price]),
    SUMX(_table, TableName[Sale Price])
)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 04 Mar 2023 04:53:06 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Summarise-Non-Unique-Values/m-p/3111364#M109919</guid>
      <dc:creator>FreemanZ</dc:creator>
      <dc:date>2023-03-04T04:53:06Z</dc:date>
    </item>
    <item>
      <title>Re: Summarise Non Unique Values</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Summarise-Non-Unique-Values/m-p/3113251#M110098</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for the reply.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm trying to summarise all the columns if multiple rows are itentical for an order.&amp;nbsp; So if you have multiple rows where the Cost Price, Sale Price and Margin % are the same, sumarise.&amp;nbsp; If there are orders where the Cost Price, Sale Price and Margin % on an order are different I don't want to summarise.&amp;nbsp; I hope that is clear.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Greg.&amp;nbsp; &amp;nbsp;&lt;/P&gt;&lt;P&gt;If there are&amp;nbsp; &amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 06 Mar 2023 08:23:12 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Summarise-Non-Unique-Values/m-p/3113251#M110098</guid>
      <dc:creator>grega</dc:creator>
      <dc:date>2023-03-06T08:23:12Z</dc:date>
    </item>
    <item>
      <title>Re: Summarise Non Unique Values</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Summarise-Non-Unique-Values/m-p/3113253#M110099</link>
      <description>&lt;P&gt;Thanks.&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 06 Mar 2023 08:24:32 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Summarise-Non-Unique-Values/m-p/3113253#M110099</guid>
      <dc:creator>grega</dc:creator>
      <dc:date>2023-03-06T08:24:32Z</dc:date>
    </item>
    <item>
      <title>Re: Summarise Non Unique Values</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Summarise-Non-Unique-Values/m-p/3113270#M110104</link>
      <description>&lt;P&gt;hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="522666" data-lia-user-login="grega" class="lia-mention lia-mention-user"&gt;grega&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;still quite unclear.&amp;nbsp;could you post your expected result?&lt;/P&gt;</description>
      <pubDate>Mon, 06 Mar 2023 08:34:44 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Summarise-Non-Unique-Values/m-p/3113270#M110104</guid>
      <dc:creator>FreemanZ</dc:creator>
      <dc:date>2023-03-06T08:34:44Z</dc:date>
    </item>
    <item>
      <title>Re: Summarise Non Unique Values</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Summarise-Non-Unique-Values/m-p/3113330#M110109</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Sure, I'm probably not explaining this very well.&amp;nbsp; With regard to the identical rows.&amp;nbsp; I don't actually want to sum the values of the identical rows.&amp;nbsp; I only want one row from multiple rows.&amp;nbsp; For example, If I originally have this:&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Id&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Cust Name&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Order No&amp;nbsp; Stock Reference&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Cost Price Sales Price&amp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t;TD&gt;KPCB_14768&lt;/TD&gt;&lt;TD&gt;15&lt;/TD&gt;&lt;TD&gt;36.37&lt;/TD&gt;&lt;TD&gt;58.76&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Also, anything that is not a duplicate needs to display all the rows for the order, etc.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I hope this clears things up.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Greg.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 06 Mar 2023 09:02:19 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Summarise-Non-Unique-Values/m-p/3113330#M110109</guid>
      <dc:creator>grega</dc:creator>
      <dc:date>2023-03-06T09:02:19Z</dc:date>
    </item>
    <item>
      <title>Re: Summarise Non Unique Values</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Summarise-Non-Unique-Values/m-p/3113346#M110111</link>
      <description>&lt;P&gt;Sorry, the table did not come out very well.&amp;nbsp; Try these&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Before:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;Id&lt;/TD&gt;&lt;TD&gt;Cust No&lt;/TD&gt;&lt;TD&gt;Order No&lt;/TD&gt;&lt;TD&gt;Stock Ref&lt;/TD&gt;&lt;TD&gt;Cost Price&lt;/TD&gt;&lt;TD&gt;Sales Price&lt;/TD&gt;&lt;TD&gt;Margin %&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;AB Smith&lt;/TD&gt;&lt;TD&gt;2354&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ODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Greg.&lt;/P&gt;</description>
      <pubDate>Mon, 06 Mar 2023 09:09:19 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Summarise-Non-Unique-Values/m-p/3113346#M110111</guid>
      <dc:creator>grega</dc:creator>
      <dc:date>2023-03-06T09:09:19Z</dc:date>
    </item>
    <item>
      <title>Re: Summarise Non Unique Values</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Summarise-Non-Unique-Values/m-p/3113359#M110113</link>
      <description>&lt;P&gt;hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="522666" data-lia-user-login="grega" class="lia-mention lia-mention-user"&gt;grega&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;try to create a calculated table with:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Table = 
ADDCOLUMNS(
    SUMMARIZE(
        TableName,
        TableName[Cust No],
        TableName[Order No],
        TableName[Stock Ref],
        TableName[Cost Price],
        TableName[Sales Price],
        TableName[Margin %]
    ),
    "ID",
    CALCULATE(MIN(TableName[Id]))
)&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;</description>
      <pubDate>Mon, 06 Mar 2023 09:20:03 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Summarise-Non-Unique-Values/m-p/3113359#M110113</guid>
      <dc:creator>FreemanZ</dc:creator>
      <dc:date>2023-03-06T09:20:03Z</dc:date>
    </item>
    <item>
      <title>Re: Summarise Non Unique Values</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Summarise-Non-Unique-Values/m-p/3113386#M110117</link>
      <description>&lt;P&gt;or you plot a table visual with all the needed column and choose "min" for the id colum and "don't summarize" for all other columns&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 06 Mar 2023 09:25:41 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Summarise-Non-Unique-Values/m-p/3113386#M110117</guid>
      <dc:creator>FreemanZ</dc:creator>
      <dc:date>2023-03-06T09:25:41Z</dc:date>
    </item>
    <item>
      <title>Re: Summarise Non Unique Values</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Summarise-Non-Unique-Values/m-p/3113557#M110132</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Ok, will have a look, I think think this will work.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Greg.&lt;/P&gt;</description>
      <pubDate>Mon, 06 Mar 2023 10:32:44 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Summarise-Non-Unique-Values/m-p/3113557#M110132</guid>
      <dc:creator>grega</dc:creator>
      <dc:date>2023-03-06T10:32:44Z</dc:date>
    </item>
  </channel>
</rss>

