<?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: Calculations within categories in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculations-within-categories/m-p/3174153#M114525</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&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;,&lt;/P&gt;&lt;P&gt;thanks for your reply, but I'm not getting a proper result yet.&lt;BR /&gt;Shouldn't the table 'Dim Retailer' also be taken into the measure&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>Wed, 05 Apr 2023 15:03:22 GMT</pubDate>
    <dc:creator>MBreden</dc:creator>
    <dc:date>2023-04-05T15:03:22Z</dc:date>
    <item>
      <title>Calculations within categories</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculations-within-categories/m-p/3173915#M114507</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;In my PBI table, values are calculated by category and retailer.&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;Value = SUM('Data'[TradeTerm Value])&lt;BR /&gt;'Dim Retailer'[Retailer ID]&lt;BR /&gt;'Dim Category'[Main]&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I would now like to calculate the sum, max, min, average and percentage from each category.&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;Can someone please help me with the measures?&lt;/P&gt;&lt;P&gt;thanks a lot, Mel&lt;/P&gt;</description>
      <pubDate>Wed, 05 Apr 2023 13:10:45 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculations-within-categories/m-p/3173915#M114507</guid>
      <dc:creator>MBreden</dc:creator>
      <dc:date>2023-04-05T13:10:45Z</dc:date>
    </item>
    <item>
      <title>Re: Calculations within categories</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculations-within-categories/m-p/3174021#M114512</link>
      <description>&lt;P&gt;hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="173561" data-lia-user-login="MBreden" class="lia-mention lia-mention-user"&gt;MBreden&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;not sure if i fully get you, you may try to plot a table visual with necessary columns and measures like:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Sum = 
SUMX( //replacing SUMX with MINX, MAXX, AVERAGEX for other measures
    FILTER(
        ALL(TableName),
        TableName[Categorie] = MAX(TableName[Categorie])
    ),
    TableName[Value]
)

TT% = 
DIVIDE(
    SUM(TableName[Value]),
    [Sum]
)&lt;/LI-CODE&gt;&lt;P&gt;it worked like:&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 05 Apr 2023 14:07:21 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculations-within-categories/m-p/3174021#M114512</guid>
      <dc:creator>FreemanZ</dc:creator>
      <dc:date>2023-04-05T14:07:21Z</dc:date>
    </item>
    <item>
      <title>Re: Calculations within categories</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculations-within-categories/m-p/3174047#M114513</link>
      <description>&lt;P&gt;hi &lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="173561" data-lia-user-login="MBreden" class="lia-mention lia-mention-user"&gt;MBreden&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;if you mind the duplicates, try like:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Sum2 = 
VAR _table = 
FILTER(
    ALL(TableName),
    TableName[Categorie] = MAX(TableName[Categorie])
)
VAR _id =MAXX( _table,TableName[Retailer ID]
)
RETURN
IF(
    MAX(TableName[Retailer ID]) = _id, 
    SUMX( _table, TableName[Value]) //replacing SUMX with MINX, MAXX, AVERAGEX
)&lt;/LI-CODE&gt;&lt;P&gt;it worked like:&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 05 Apr 2023 14:15:43 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculations-within-categories/m-p/3174047#M114513</guid>
      <dc:creator>FreemanZ</dc:creator>
      <dc:date>2023-04-05T14:15:43Z</dc:date>
    </item>
    <item>
      <title>Re: Calculations within categories</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculations-within-categories/m-p/3174153#M114525</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&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;,&lt;/P&gt;&lt;P&gt;thanks for your reply, but I'm not getting a proper result yet.&lt;BR /&gt;Shouldn't the table 'Dim Retailer' also be taken into the measure&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>Wed, 05 Apr 2023 15:03:22 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculations-within-categories/m-p/3174153#M114525</guid>
      <dc:creator>MBreden</dc:creator>
      <dc:date>2023-04-05T15:03:22Z</dc:date>
    </item>
    <item>
      <title>Re: Calculations within categories</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculations-within-categories/m-p/3176931#M114719</link>
      <description>&lt;P&gt;hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="173561" data-lia-user-login="MBreden" class="lia-mention lia-mention-user"&gt;MBreden&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;[Main] and measure [TT Value], what are they? How are they related with the columns in your original post?&lt;/P&gt;</description>
      <pubDate>Fri, 07 Apr 2023 01:38:35 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculations-within-categories/m-p/3176931#M114719</guid>
      <dc:creator>FreemanZ</dc:creator>
      <dc:date>2023-04-07T01:38:35Z</dc:date>
    </item>
    <item>
      <title>Re: Calculations within categories</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculations-within-categories/m-p/3181633#M115040</link>
      <description>&lt;P&gt;Hi &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;,&lt;/P&gt;&lt;P&gt;I could not implement your 2nd suggestion at all.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;My data model looks like this:&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;For better understanding, I have created a shortened &lt;A title="Example " href="https://melaniebreden-my.sharepoint.com/:u:/g/personal/office_melaniebreden_onmicrosoft_com/EUPSY22WMI5CgDvDc5AN1hgBdA6XXwmCLnE_ugbWGWV36A?e=fd5zeV" target="_blank" rel="noopener"&gt;example file&lt;/A&gt;.&lt;/P&gt;</description>
      <pubDate>Tue, 11 Apr 2023 10:55:42 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculations-within-categories/m-p/3181633#M115040</guid>
      <dc:creator>MBreden</dc:creator>
      <dc:date>2023-04-11T10:55:42Z</dc:date>
    </item>
  </channel>
</rss>

