<?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: DAX to calculate Hierarchical sales by weight in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-to-calculate-Hierarchical-sales-by-weight/m-p/959270#M11151</link>
    <description>&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="168451" data-lia-user-login="JoeDoe" class="lia-mention lia-mention-user"&gt;JoeDoe&lt;/a&gt;&lt;BR /&gt;And what do you want to see as a result?</description>
    <pubDate>Wed, 04 Mar 2020 19:34:56 GMT</pubDate>
    <dc:creator>az38</dc:creator>
    <dc:date>2020-03-04T19:34:56Z</dc:date>
    <item>
      <title>DAX to calculate Hierarchical sales by weight</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-to-calculate-Hierarchical-sales-by-weight/m-p/959135#M11135</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My sales data are from SQL database and my weight data are from Excel spreadesheet.&lt;/P&gt;&lt;P&gt;This is my model diagram:&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;Now I want to calculate my sales by weight. So I am looking for some fomular like this:&lt;/P&gt;&lt;P&gt;Sales/Weight&lt;/P&gt;&lt;P&gt;This has to be filtered by hierarchy.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried this DAX measure:&lt;/P&gt;&lt;P&gt;Weight =&amp;nbsp;&lt;BR /&gt;VAR catW = SELECTEDVALUE(weight[catgory])&lt;/P&gt;&lt;P&gt;VAR deptW = SELECTEDVALUE(weight[subdept])&lt;/P&gt;&lt;P&gt;VAR catS = SELECTEDVALUE(CAT_TAB[categoryDesc])&lt;/P&gt;&lt;P&gt;VAR deptS = SELECTEDVALUE(SDP_TAB[DepartmentDesc])&lt;/P&gt;&lt;P&gt;RETURN&lt;/P&gt;&lt;P&gt;IF(catW=catS &amp;amp;&amp;amp; deptW=deptS,SUMX(weight,weight[weight],0))&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The weight only return a total aggregation of weight, it doesn't break down by hierarchy. Thus I can't use this weight to divide my sales.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What is my issue? Can anyone help me on this?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;</description>
      <pubDate>Wed, 04 Mar 2020 17:34:02 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-to-calculate-Hierarchical-sales-by-weight/m-p/959135#M11135</guid>
      <dc:creator>JoeDoe</dc:creator>
      <dc:date>2020-03-04T17:34:02Z</dc:date>
    </item>
    <item>
      <title>Re: DAX to calculate Hierarchical sales by weight</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-to-calculate-Hierarchical-sales-by-weight/m-p/959178#M11141</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="168451" data-lia-user-login="JoeDoe" class="lia-mention lia-mention-user"&gt;JoeDoe&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Im not sure understand you correct, but maybe CALCULATE() will be enough?&lt;/P&gt;
&lt;P&gt;like&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;IF(catW=catS &amp;amp;&amp;amp; deptW=deptS,CALCULATE(SUMX(weight,weight[weight]),0))&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 04 Mar 2020 18:21:55 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-to-calculate-Hierarchical-sales-by-weight/m-p/959178#M11141</guid>
      <dc:creator>az38</dc:creator>
      <dc:date>2020-03-04T18:21:55Z</dc:date>
    </item>
    <item>
      <title>Re: DAX to calculate Hierarchical sales by weight</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-to-calculate-Hierarchical-sales-by-weight/m-p/959244#M11148</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="82403" data-lia-user-login="az38" class="lia-mention lia-mention-user"&gt;az38&lt;/a&gt;&amp;nbsp;Thanks for the adivse.&lt;/P&gt;&lt;P&gt;I found if I add the department and category from weight into the visulazation table, I can break down weight correctly.&lt;/P&gt;&lt;P&gt;I think my following question would be: is there any workaround for use my sales hierarchy to break down my weight data?&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is what I have now:&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 04 Mar 2020 19:19:05 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-to-calculate-Hierarchical-sales-by-weight/m-p/959244#M11148</guid>
      <dc:creator>JoeDoe</dc:creator>
      <dc:date>2020-03-04T19:19:05Z</dc:date>
    </item>
    <item>
      <title>Re: DAX to calculate Hierarchical sales by weight</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-to-calculate-Hierarchical-sales-by-weight/m-p/959270#M11151</link>
      <description>&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="168451" data-lia-user-login="JoeDoe" class="lia-mention lia-mention-user"&gt;JoeDoe&lt;/a&gt;&lt;BR /&gt;And what do you want to see as a result?</description>
      <pubDate>Wed, 04 Mar 2020 19:34:56 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-to-calculate-Hierarchical-sales-by-weight/m-p/959270#M11151</guid>
      <dc:creator>az38</dc:creator>
      <dc:date>2020-03-04T19:34:56Z</dc:date>
    </item>
    <item>
      <title>Re: DAX to calculate Hierarchical sales by weight</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-to-calculate-Hierarchical-sales-by-weight/m-p/959275#M11152</link>
      <description>&lt;P&gt;I am expecting use the hierarchy of weight to break down the sales OR use the hierarchy of sales to break down the weight.&lt;/P&gt;</description>
      <pubDate>Wed, 04 Mar 2020 19:38:37 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-to-calculate-Hierarchical-sales-by-weight/m-p/959275#M11152</guid>
      <dc:creator>JoeDoe</dc:creator>
      <dc:date>2020-03-04T19:38:37Z</dc:date>
    </item>
  </channel>
</rss>

