<?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 % risk numbers based on Sum of Parent product in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Get-risk-numbers-based-on-Sum-of-Parent-product/m-p/1526227#M29878</link>
    <description>&lt;P&gt;Is this a calculated column or a measure you want?&lt;/P&gt;</description>
    <pubDate>Tue, 01 Dec 2020 11:05:18 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2020-12-01T11:05:18Z</dc:date>
    <item>
      <title>Get % risk numbers based on Sum of Parent product</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Get-risk-numbers-based-on-Sum-of-Parent-product/m-p/1526169#M29877</link>
      <description>&lt;P&gt;&lt;SPAN&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="119281" data-lia-user-login="dax" class="lia-mention lia-mention-user"&gt;dax&lt;/a&gt;&amp;nbsp;Anonymous&lt;/a&gt;&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="22811" data-lia-user-login="BIHelp" class="lia-mention lia-mention-user"&gt;BIHelp&lt;/a&gt;&amp;nbsp;&amp;nbsp;Need help&amp;nbsp; i have the following table with parent and child products and would like to derive the risk measures ($amount) in % . as shown in the example . need to create a measure for Column I&amp;nbsp; &amp;nbsp; &amp;nbsp; E.g. Child product "AA" is a sub product of parent "A" , hence the risk numbers should be a % of the parent total sum which in this case is $10,000.00&amp;nbsp; for 31st Aug , %risk for row 4 should be H3/SUM(G2:G3) , same for row 2,3 , &amp;amp; 5 . Similarly for Product B category .&amp;nbsp; &amp;nbsp; Appreciate your help in advance&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;i tried using Calculate(SUM(Total),ALLEXCEPT(Product,Date,ParentProduct)) &amp;amp; assigning the value using SWITH statement but no luck&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&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;&lt;img /&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 01 Dec 2020 10:48:54 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Get-risk-numbers-based-on-Sum-of-Parent-product/m-p/1526169#M29877</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-12-01T10:48:54Z</dc:date>
    </item>
    <item>
      <title>Re: Get % risk numbers based on Sum of Parent product</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Get-risk-numbers-based-on-Sum-of-Parent-product/m-p/1526227#M29878</link>
      <description>&lt;P&gt;Is this a calculated column or a measure you want?&lt;/P&gt;</description>
      <pubDate>Tue, 01 Dec 2020 11:05:18 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Get-risk-numbers-based-on-Sum-of-Parent-product/m-p/1526227#M29878</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-12-01T11:05:18Z</dc:date>
    </item>
    <item>
      <title>Re: Get % risk numbers based on Sum of Parent product</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Get-risk-numbers-based-on-Sum-of-Parent-product/m-p/1526277#M29880</link>
      <description>&lt;P&gt;If this is to be a calculated column, then...&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;[% Risk] = // calculated column
var __parent = T[Parent Product]
var __child = T[Child]
var __date = T[Date]
var __childTotal = T[Total]
var __parentTotal =
	sumx(
		filter(
			T,
			T[Parent Product] = __parent
			&amp;amp;&amp;amp;
			T[Date] = __date
			&amp;amp;&amp;amp;
			T[Child] = __child
		),
		T[Total]
	)
var __risk =
	// If you want to see this number as
	// a percentage, you should use the
	// formatting feature of PBI and not
	// fiddle with this number directly.
	divide(
		__childTotal,
		__parentTotal
	)
return
	__risk&lt;/LI-CODE&gt;</description>
      <pubDate>Tue, 01 Dec 2020 11:13:22 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Get-risk-numbers-based-on-Sum-of-Parent-product/m-p/1526277#M29880</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-12-01T11:13:22Z</dc:date>
    </item>
    <item>
      <title>Re: Get % risk numbers based on Sum of Parent product</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Get-risk-numbers-based-on-Sum-of-Parent-product/m-p/1526698#M29895</link>
      <description>&lt;DIV&gt;&lt;SPAN&gt;Risk% = &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Var Risk =SUM('Table'[Risk])&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Var Parent/ChildSale = CALCULATE(&lt;BR /&gt;SUM&lt;/SPAN&gt;&lt;SPAN&gt;('Table'[Total]),&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;ALLEXCEPT('Table', 'Table'[Parent Product], 'Table'[Date], 'Table'[Child Product])&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Return&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;DIVIDE( Risk, Parent/ChildSale)&lt;BR /&gt;&lt;/SPAN&gt;&lt;/DIV&gt;</description>
      <pubDate>Tue, 01 Dec 2020 14:26:50 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Get-risk-numbers-based-on-Sum-of-Parent-product/m-p/1526698#M29895</guid>
      <dc:creator>BIHelp</dc:creator>
      <dc:date>2020-12-01T14:26:50Z</dc:date>
    </item>
  </channel>
</rss>

