<?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: Group rows with same and different values. in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Group-rows-with-same-and-different-values/m-p/3044068#M104580</link>
    <description>&lt;P&gt;hi&amp;nbsp;Anonymous&lt;/LI-USER&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;CALCULATETABLE seems unnecessary, or?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;p.s. please consider @someone, to continue a discussion.&lt;/P&gt;</description>
    <pubDate>Thu, 26 Jan 2023 01:24:38 GMT</pubDate>
    <dc:creator>FreemanZ</dc:creator>
    <dc:date>2023-01-26T01:24:38Z</dc:date>
    <item>
      <title>Group rows with same and different values.</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Group-rows-with-same-and-different-values/m-p/3043911#M104565</link>
      <description>&lt;P&gt;Hi, I am trying to group/summarize rows with the same values. The problem is some of rows are a match for 2/3 of the columns which screws up my data.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Example:&amp;nbsp;&lt;/P&gt;&lt;P&gt;Before query is executed&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;Email&lt;/TD&gt;&lt;TD&gt;Dept Number&lt;/TD&gt;&lt;TD&gt;Cost&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;name@mail.com&lt;/TD&gt;&lt;TD&gt;5656&lt;/TD&gt;&lt;TD&gt;2.00&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;name2@mail.com&lt;/TD&gt;&lt;TD&gt;1212&lt;/TD&gt;&lt;TD&gt;6.00&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;name@mail.com&lt;/TD&gt;&lt;TD&gt;5656&lt;/TD&gt;&lt;TD&gt;3.00&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;name@mail.com&lt;/TD&gt;&lt;TD&gt;5656&lt;/TD&gt;&lt;TD&gt;2.00&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;After query is executed&lt;/P&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;Email&lt;/TD&gt;&lt;TD&gt;Dept Number&lt;/TD&gt;&lt;TD&gt;Cost&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;name@mail.com&lt;/TD&gt;&lt;TD&gt;5656&lt;/TD&gt;&lt;TD&gt;4.00&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;name2@mail.com&lt;/TD&gt;&lt;TD&gt;1212&lt;/TD&gt;&lt;TD&gt;6.00&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;name@mail.com&lt;/TD&gt;&lt;TD&gt;5656&lt;/TD&gt;&lt;TD&gt;3.00&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I need the similar rows with different cost to be rolled up as well. I am using a simple summarize query to achieve this but how can I get the rows with different cost to be grouped in as well?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 25 Jan 2023 22:45:42 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Group-rows-with-same-and-different-values/m-p/3043911#M104565</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-01-25T22:45:42Z</dc:date>
    </item>
    <item>
      <title>Re: Group rows with same and different values.</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Group-rows-with-same-and-different-values/m-p/3043919#M104566</link>
      <description>&lt;P&gt;hi&amp;nbsp;Anonymous&lt;/LI-USER&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;try to create a calculated table like:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;SumTable =
ADDCOLUMNS(
    SUMMARIZE(
        TableName,
        TableName[Email],
        TableName[Dept Number]
    ),
    "Cost",
    CALCULATE(SUM(TableName[Cost]))
)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Also, in Power Query Editor, you can try to Groupby the query,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://learn.microsoft.com/en-us/power-query/group-by" target="_blank"&gt;https://learn.microsoft.com/en-us/power-query/group-by&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 25 Jan 2023 22:51:59 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Group-rows-with-same-and-different-values/m-p/3043919#M104566</guid>
      <dc:creator>FreemanZ</dc:creator>
      <dc:date>2023-01-25T22:51:59Z</dc:date>
    </item>
    <item>
      <title>Re: Group rows with same and different values.</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Group-rows-with-same-and-different-values/m-p/3044056#M104579</link>
      <description>&lt;P&gt;That worked ! One more thing though im trying to add a date filter but Im getting an error that "," before cost is incorrect. Any Idea why?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;DEFINE VAR MAveragePrice =&lt;BR /&gt;ADDCOLUMNS (&lt;BR /&gt;CALCULATETABLE (&lt;BR /&gt;SUMMARIZE ( 'Usage details amortized',&lt;BR /&gt;'Usage details amortized'[Tags - copy.DepartmentNumber],&lt;BR /&gt;'Usage details amortized'[Tags - copy.OwnerEmail]),&lt;BR /&gt;Usage details amortized'[Date])&amp;gt;= DATE ( 2022, 12, 01 ) &amp;amp;&amp;amp;&lt;BR /&gt;'Usage details amortized'[Date] &amp;lt;= DATE ( 2022, 12, 31 )&lt;BR /&gt;),&lt;BR /&gt;"Cost",&lt;BR /&gt;CALCULATE(SUM('Usage details amortized'[Cost])),&lt;BR /&gt;)&lt;BR /&gt;EVALUATE&lt;BR /&gt;MAveragePrice&lt;/P&gt;</description>
      <pubDate>Thu, 26 Jan 2023 01:09:31 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Group-rows-with-same-and-different-values/m-p/3044056#M104579</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-01-26T01:09:31Z</dc:date>
    </item>
    <item>
      <title>Re: Group rows with same and different values.</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Group-rows-with-same-and-different-values/m-p/3044068#M104580</link>
      <description>&lt;P&gt;hi&amp;nbsp;Anonymous&lt;/LI-USER&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;CALCULATETABLE seems unnecessary, or?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;p.s. please consider @someone, to continue a discussion.&lt;/P&gt;</description>
      <pubDate>Thu, 26 Jan 2023 01:24:38 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Group-rows-with-same-and-different-values/m-p/3044068#M104580</guid>
      <dc:creator>FreemanZ</dc:creator>
      <dc:date>2023-01-26T01:24:38Z</dc:date>
    </item>
    <item>
      <title>Re: Group rows with same and different values.</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Group-rows-with-same-and-different-values/m-p/3044070#M104581</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="460868" data-lia-user-login="FreemanZ" class="lia-mention lia-mention-user"&gt;FreemanZ&lt;/a&gt;&amp;nbsp;Maybe. I've tried Omitting it but I'm sure I got the formatting wrong. Where do you suppose I put the date filter?&lt;/P&gt;</description>
      <pubDate>Thu, 26 Jan 2023 01:27:41 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Group-rows-with-same-and-different-values/m-p/3044070#M104581</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-01-26T01:27:41Z</dc:date>
    </item>
    <item>
      <title>Re: Group rows with same and different values.</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Group-rows-with-same-and-different-values/m-p/3045077#M104638</link>
      <description>&lt;P&gt;hi&amp;nbsp;Anonymous&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;sorry, i mislook part of your previous code. In cases like that, the filtering shall apply outside of ADDCOLUMNS.&amp;nbsp;&lt;/P&gt;&lt;P&gt;try like:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;DEFINE 
VAR MAveragePrice =
CALCULATETABLE (
    ADDCOLUMNS (
        SUMMARIZE ( 
            'Usage details amortized',
            'Usage details amortized'[Tags - copy.DepartmentNumber],
            'Usage details amortized'[Tags - copy.OwnerEmail]),
            'Usage details amortized'[Date]
        ),
        "Cost",
        CALCULATE(SUM('Usage details amortized'[Cost]))
    ),
    'Usage details amortized'[Date])&amp;gt;= DATE ( 2022, 12, 01 ) &amp;amp;&amp;amp;
    'Usage details amortized'[Date] &amp;lt;= DATE ( 2022, 12, 31 )
)
EVALUATE
MAveragePrice&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 26 Jan 2023 13:06:48 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Group-rows-with-same-and-different-values/m-p/3045077#M104638</guid>
      <dc:creator>FreemanZ</dc:creator>
      <dc:date>2023-01-26T13:06:48Z</dc:date>
    </item>
  </channel>
</rss>

