<?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: Weightage based on unique value in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Weightage-based-on-unique-value/m-p/4330171#M171889</link>
    <description>&lt;P&gt;Anonymous&lt;/LI-USER&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Calculated column:&lt;/P&gt;&lt;PRE&gt;Weightage = &lt;BR /&gt;'Table'[Nominal amount] / &lt;BR /&gt;CALCULATE(&lt;BR /&gt;SUM('Table'[Nominal amount]),&lt;BR /&gt;ALLEXCEPT('Table', 'Table'[Portfolio])&lt;BR /&gt;)&lt;/PRE&gt;&lt;P&gt;&lt;span class="lia-unicode-emoji" title=":love_letter:"&gt;💌&lt;/span&gt; If this helped, a Kudos &lt;span class="lia-unicode-emoji" title=":thumbs_up:"&gt;👍&lt;/span&gt; or Solution mark &lt;span class="lia-unicode-emoji" title=":white_heavy_check_mark:"&gt;✅&lt;/span&gt; would be great! &lt;span class="lia-unicode-emoji" title=":party_popper:"&gt;🎉&lt;/span&gt;&lt;BR /&gt;Cheers,&lt;BR /&gt;Kedar&lt;BR /&gt;&lt;A href="https://www.linkedin.com/in/kedar-pande" target="_blank" rel="noopener"&gt;Connect on LinkedIn&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Mon, 16 Dec 2024 05:54:50 GMT</pubDate>
    <dc:creator>Kedar_Pande</dc:creator>
    <dc:date>2024-12-16T05:54:50Z</dc:date>
    <item>
      <title>Weightage based on unique value</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Weightage-based-on-unique-value/m-p/4330060#M171883</link>
      <description>&lt;P&gt;Hi all, any advice in relation to the following problem would be greatly appreciated.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Background to problem:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a data table with portfolio ID column which there will be several customers under same portfolio ID.&amp;nbsp; In my previous excel working I am using the nominal amount from each customer ID divided by the sum up the total nominal of each PFID for the weightage.&amp;nbsp;How do I build a formula column in Power BI table that return the weightage amount based on each unique customer ID?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Example as below with the calculation I did in Excel:&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;Portfolio&lt;/TD&gt;&lt;TD&gt;Customer ID&lt;/TD&gt;&lt;TD&gt;Nominal amount&lt;/TD&gt;&lt;TD&gt;Weightage&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;PFID55&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;600,000&lt;/TD&gt;&lt;TD&gt;0.705882&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;PFID60&lt;/TD&gt;&lt;TD&gt;2&lt;/TD&gt;&lt;TD&gt;200,000&lt;/TD&gt;&lt;TD&gt;0.117647&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;PFID60&lt;/TD&gt;&lt;TD&gt;3&lt;/TD&gt;&lt;TD&gt;100,000&lt;/TD&gt;&lt;TD&gt;0.058824&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;PFID55&lt;/TD&gt;&lt;TD&gt;4&lt;/TD&gt;&lt;TD&gt;100,000&lt;/TD&gt;&lt;TD&gt;0.117647&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;PFID60&lt;/TD&gt;&lt;TD&gt;5&lt;/TD&gt;&lt;TD&gt;500,000&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14&lt;/TD&gt;&lt;TD&gt;200,000&lt;/TD&gt;&lt;TD&gt;0.285714&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;PFID65&lt;/TD&gt;&lt;TD&gt;15&lt;/TD&gt;&lt;TD&gt;700,000&lt;/TD&gt;&lt;TD&gt;0.736842&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;PFID57&lt;/TD&gt;&lt;TD&gt;16&lt;/TD&gt;&lt;TD&gt;300,000&lt;/TD&gt;&lt;TD&gt;0.428571&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;PFID60&lt;/TD&gt;&lt;TD&gt;17&lt;/TD&gt;&lt;TD&gt;500,000&lt;/TD&gt;&lt;TD&gt;0.294118&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 16 Dec 2024 03:49:01 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Weightage-based-on-unique-value/m-p/4330060#M171883</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-12-16T03:49:01Z</dc:date>
    </item>
    <item>
      <title>Re: Weightage based on unique value</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Weightage-based-on-unique-value/m-p/4330099#M171884</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;Please check the below picture and the attached pbix file.&lt;/P&gt;
&lt;P&gt;It is for creating a calculated column.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&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;
&lt;LI-CODE lang="markup"&gt;Weightage CC = 
VAR _portfolio = Data[Portfolio]
RETURN
    DIVIDE (
        Data[Nominal amount],
        SUMX ( FILTER ( Data, Data[Portfolio] = _portfolio ), Data[Nominal amount] )
    )
&lt;/LI-CODE&gt;</description>
      <pubDate>Mon, 16 Dec 2024 04:48:06 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Weightage-based-on-unique-value/m-p/4330099#M171884</guid>
      <dc:creator>Jihwan_Kim</dc:creator>
      <dc:date>2024-12-16T04:48:06Z</dc:date>
    </item>
    <item>
      <title>Re: Weightage based on unique value</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Weightage-based-on-unique-value/m-p/4330171#M171889</link>
      <description>&lt;P&gt;Anonymous&lt;/LI-USER&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Calculated column:&lt;/P&gt;&lt;PRE&gt;Weightage = &lt;BR /&gt;'Table'[Nominal amount] / &lt;BR /&gt;CALCULATE(&lt;BR /&gt;SUM('Table'[Nominal amount]),&lt;BR /&gt;ALLEXCEPT('Table', 'Table'[Portfolio])&lt;BR /&gt;)&lt;/PRE&gt;&lt;P&gt;&lt;span class="lia-unicode-emoji" title=":love_letter:"&gt;💌&lt;/span&gt; If this helped, a Kudos &lt;span class="lia-unicode-emoji" title=":thumbs_up:"&gt;👍&lt;/span&gt; or Solution mark &lt;span class="lia-unicode-emoji" title=":white_heavy_check_mark:"&gt;✅&lt;/span&gt; would be great! &lt;span class="lia-unicode-emoji" title=":party_popper:"&gt;🎉&lt;/span&gt;&lt;BR /&gt;Cheers,&lt;BR /&gt;Kedar&lt;BR /&gt;&lt;A href="https://www.linkedin.com/in/kedar-pande" target="_blank" rel="noopener"&gt;Connect on LinkedIn&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 16 Dec 2024 05:54:50 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Weightage-based-on-unique-value/m-p/4330171#M171889</guid>
      <dc:creator>Kedar_Pande</dc:creator>
      <dc:date>2024-12-16T05:54:50Z</dc:date>
    </item>
    <item>
      <title>Re: Weightage based on unique value</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Weightage-based-on-unique-value/m-p/4338437#M172262</link>
      <description>&lt;P&gt;Hi&amp;nbsp;Anonymous&lt;/LI-USER&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;We haven’t heard from you on the last response and was just checking back to see if you have a resolution yet.&lt;BR /&gt;In case if you have any resolution please do share that same with the community as it can be helpful to others.&lt;BR /&gt;Otherwise, will respond back with the more details and we will try to help.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 20 Dec 2024 10:00:50 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Weightage-based-on-unique-value/m-p/4338437#M172262</guid>
      <dc:creator>v-aatheeque</dc:creator>
      <dc:date>2024-12-20T10:00:50Z</dc:date>
    </item>
    <item>
      <title>Re: Weightage based on unique value</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Weightage-based-on-unique-value/m-p/4338509#M172269</link>
      <description>&lt;P&gt;Hi&amp;nbsp;Anonymous&lt;/LI-USER&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Go to the table in Power BI where your data resides.&lt;/LI&gt;&lt;LI&gt;Click on the &lt;STRONG&gt;Modeling&lt;/STRONG&gt; tab and select &lt;STRONG&gt;New Column&lt;/STRONG&gt;.&lt;/LI&gt;&lt;LI&gt;Use the following DAX formula:&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Weightage = 
VAR PortfolioID = [Portfolio] 
VAR TotalNominalForPortfolio = 
    CALCULATE(
        SUM('YourTable'[Nominal amount]),
        ALLEXCEPT('YourTable', 'YourTable'[Portfolio])
    )
RETURN 
    DIVIDE([Nominal amount], TotalNominalForPortfolio, 0)
​&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Example Output:&lt;BR /&gt;&lt;img /&gt;&lt;/LI&gt;&lt;LI&gt;Ensure the "Portfolio" and "Nominal amount" columns are correctly formatted and named.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;Did I answer your question? Mark my post as a solution, this will help others!&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;If my response(s) assisted you in any way, don't forget to drop me a "&lt;STRONG&gt;Kudos&lt;/STRONG&gt;" &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Kind Regards,&lt;BR /&gt;Poojara&lt;BR /&gt;Data Analyst | MSBI Developer | Power BI Consultant&lt;BR /&gt;&lt;STRONG&gt;Consider Subscribing my YouTube for Beginners/Advance Concepts:&lt;/STRONG&gt;&amp;nbsp;&lt;A href="https://youtube.com/@biconcepts?si=04iw9SYI2HN80HKS" target="_self"&gt;https://youtube.com/@biconcepts?si=04iw9SYI2HN80HKS&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 20 Dec 2024 10:41:39 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Weightage-based-on-unique-value/m-p/4338509#M172269</guid>
      <dc:creator>Poojara_D12</dc:creator>
      <dc:date>2024-12-20T10:41:39Z</dc:date>
    </item>
  </channel>
</rss>

