<?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: Calculate Price Allocation Based on one of instances in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-Price-Allocation-Based-on-one-of-instances/m-p/945056#M10252</link>
    <description>&lt;P&gt;Hi Greg &amp;amp; D&lt;/P&gt;&lt;P&gt;Finally after hours I've managed to create a test of the pbix&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It was a challenege trying to get it as close as the original&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can you please look and advise if the attached pbix is ok, or I need to work on it a bit more&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 24 Feb 2020 12:19:09 GMT</pubDate>
    <dc:creator>RahulPBI</dc:creator>
    <dc:date>2020-02-24T12:19:09Z</dc:date>
    <item>
      <title>Calculate Price Allocation Based on one of instances</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-Price-Allocation-Based-on-one-of-instances/m-p/931269#M9561</link>
      <description>&lt;P&gt;Hi Experts&lt;/P&gt;&lt;P&gt;I am fairly new to Power BI, but been learning a lot through here&lt;/P&gt;&lt;P&gt;Let me lay out the table and data, I have filtered the rows to show just one item&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;1. I have created a Stock Database which shows the details of an Item&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;2. I have a Table called Parent Component Raw Database where it shows in how many Parent Item Group Name the component is used. Thats why the multiple instances. In this case it repeats 37 times&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;I do the count in another table called Component Item Count&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;The help i need is to create a measure to the following from the diffrent tables&lt;/P&gt;&lt;P&gt;I want to calculate how much of the total price for the 15 on hand, can be allocated to the Parent Item Group Names&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The measure I need is something like below&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;'Stock Database'[On Hand] / 'Component Item Count'[Count] * 'Stock Database'[Price]&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;this case would be 15 / 37 * 4.5193 = 1.8321&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So in the report I could break down the cose by the Parent Item Group Name as below&lt;/P&gt;&lt;P&gt;L240 which has 16 instances will get allocated $29.3136&lt;/P&gt;&lt;P&gt;A240 which has 4 instances will get allocated $7.3284&lt;/P&gt;&lt;P&gt;O359 which has 2 instances will get allocated $3.6642&lt;/P&gt;&lt;P&gt;O379 which has 1 instances will get allocated $1.8321&lt;/P&gt;&lt;P&gt;RETRO which has 1 instances will get allocated $1.8321&lt;/P&gt;&lt;P&gt;ACCESS which has 1 instance will get allocated $1.8321&lt;/P&gt;&lt;P&gt;A740&lt;SPAN&gt; which has 1 instance will get allocated $1.8321&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;SUNDRY SALE ITEM &lt;SPAN&gt;which has 1 instance will get allocated $1.8321&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Component Items which has 2 instances will get allocated $3.6642&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;C140 which has 6 instance will get allocated $10.9926&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;L42 which has 2 instance will get allocated $3.6642&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;But when I try it as a measure i get the below error&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please help&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 13 Feb 2020 07:26:23 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-Price-Allocation-Based-on-one-of-instances/m-p/931269#M9561</guid>
      <dc:creator>RahulPBI</dc:creator>
      <dc:date>2020-02-13T07:26:23Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate Price Allocation Based on one of instances</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-Price-Allocation-Based-on-one-of-instances/m-p/943484#M10126</link>
      <description>&lt;P&gt;It seems like you are using a measure but you are not wrapping an aggregation around column references. When you have a measure, if you reference a column, you have to use an aggregation like MAX, MIN, SUM, COUNT, AVERAGE, etc. If you are certain that in your visual you have filtered down to a particular row, you can generally use any of the aggregation functions except COUNT to grab your value. I tend to use MAX.&lt;/P&gt;</description>
      <pubDate>Fri, 21 Feb 2020 21:14:47 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-Price-Allocation-Based-on-one-of-instances/m-p/943484#M10126</guid>
      <dc:creator>Greg_Deckler</dc:creator>
      <dc:date>2020-02-21T21:14:47Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate Price Allocation Based on one of instances</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-Price-Allocation-Based-on-one-of-instances/m-p/943826#M10160</link>
      <description>&lt;P&gt;To add to what &lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="313" data-lia-user-login="Greg_Deckler" class="lia-mention lia-mention-user"&gt;Greg_Deckler&lt;/a&gt; said, you've got at least 2 redundant relationships in your model. I'd remove them. More, I'd consolidate the tables that are connected with a 1-to-1 relationship. The fewer tables you have in your model, the better. A model must be as simple as possible. Ideally, it should be a pure star schema. Also, bear in mind that all fields in a fact table should be hidden from view. Slicing should be done only through dimensions. If you don't follow this best practice, you'll sooner or later be producing wrong numbers without even knowing it. If you don't believe, then you should go to &lt;A href="http://www.sqlbi.com" target="_blank"&gt;www.sqlbi.com&lt;/A&gt; and read some articles by The Italians.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best&lt;/P&gt;
&lt;P&gt;D&lt;/P&gt;</description>
      <pubDate>Sat, 22 Feb 2020 13:25:36 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-Price-Allocation-Based-on-one-of-instances/m-p/943826#M10160</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-02-22T13:25:36Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate Price Allocation Based on one of instances</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-Price-Allocation-Based-on-one-of-instances/m-p/944080#M10203</link>
      <description>&lt;P&gt;Hi Greg&lt;/P&gt;&lt;P&gt;I will try what you have suggested and let you know&lt;/P&gt;&lt;P&gt;if everything fails, will create a test Prix file and upload here&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;</description>
      <pubDate>Sun, 23 Feb 2020 11:03:58 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-Price-Allocation-Based-on-one-of-instances/m-p/944080#M10203</guid>
      <dc:creator>RahulPBI</dc:creator>
      <dc:date>2020-02-23T11:03:58Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate Price Allocation Based on one of instances</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-Price-Allocation-Based-on-one-of-instances/m-p/944083#M10204</link>
      <description>&lt;LI-CODE lang="markup"&gt;Hi D
I will read the information you advised 
Not sure which two redundant relationships, will try to upload a sample Pbix 
Regards &lt;/LI-CODE&gt;</description>
      <pubDate>Sun, 23 Feb 2020 11:06:36 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-Price-Allocation-Based-on-one-of-instances/m-p/944083#M10204</guid>
      <dc:creator>RahulPBI</dc:creator>
      <dc:date>2020-02-23T11:06:36Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate Price Allocation Based on one of instances</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-Price-Allocation-Based-on-one-of-instances/m-p/944156#M10210</link>
      <description>&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="203415" data-lia-user-login="RahulPBI" class="lia-mention lia-mention-user"&gt;RahulPBI&lt;/a&gt;, tables [* item count] and [* item lookup] should be one table (the star stands for parent or component). This simple transformation will remove 2 tables from your model and make it easier. Your model has many inactive relationships... I suspect it's therefore not optimal. &lt;BR /&gt;&lt;BR /&gt;Best&lt;BR /&gt;D</description>
      <pubDate>Sun, 23 Feb 2020 14:47:22 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-Price-Allocation-Based-on-one-of-instances/m-p/944156#M10210</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-02-23T14:47:22Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate Price Allocation Based on one of instances</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-Price-Allocation-Based-on-one-of-instances/m-p/945056#M10252</link>
      <description>&lt;P&gt;Hi Greg &amp;amp; D&lt;/P&gt;&lt;P&gt;Finally after hours I've managed to create a test of the pbix&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It was a challenege trying to get it as close as the original&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can you please look and advise if the attached pbix is ok, or I need to work on it a bit more&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 24 Feb 2020 12:19:09 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-Price-Allocation-Based-on-one-of-instances/m-p/945056#M10252</guid>
      <dc:creator>RahulPBI</dc:creator>
      <dc:date>2020-02-24T12:19:09Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate Price Allocation Based on one of instances</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-Price-Allocation-Based-on-one-of-instances/m-p/945058#M10253</link>
      <description>&lt;P&gt;and i just realised i have no way to attach the file here&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 24 Feb 2020 12:20:41 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-Price-Allocation-Based-on-one-of-instances/m-p/945058#M10253</guid>
      <dc:creator>RahulPBI</dc:creator>
      <dc:date>2020-02-24T12:20:41Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate Price Allocation Based on one of instances</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-Price-Allocation-Based-on-one-of-instances/m-p/945063#M10254</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="313" data-lia-user-login="Greg_Deckler" class="lia-mention lia-mention-user"&gt;Greg_Deckler&lt;/a&gt;&amp;nbsp;Anonymous&lt;/a&gt;&amp;nbsp;Hope this work, please let me know if it doesn't&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Sorry for all the trouble&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://1drv.ms/u/s!ApULo7UfaUptgS67MfEz-9TOBCUG?e=QNxX8O" target="_blank"&gt;https://1drv.ms/u/s!ApULo7UfaUptgS67MfEz-9TOBCUG?e=QNxX8O&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 24 Feb 2020 12:26:41 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-Price-Allocation-Based-on-one-of-instances/m-p/945063#M10254</guid>
      <dc:creator>RahulPBI</dc:creator>
      <dc:date>2020-02-24T12:26:41Z</dc:date>
    </item>
  </channel>
</rss>

