<?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: Divide all attributes into specific attribute value in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Divide-all-attributes-into-specific-attribute-value/m-p/4016012#M158286</link>
    <description>&lt;P&gt;This measure helped, thank you.&lt;BR /&gt;&lt;BR /&gt;At first, it was still coming up with the blank error where the measure only populated a value for "Total Assets" when I tried this on my live data that looks similar to the example data in my forum question. So I recreated the example data in my file and your measure worked perfectly. I ended up building my live table from scratch and found that when I did a custom sort on Attribute by a different column "Sort ID", that's when the measure went blank. I found a link (&lt;A href="https://blog.crossjoin.co.uk/2015/12/15/power-bi-desktop-sort-by-column-and-dax-calculations-that-use-the-all-function/" target="_blank"&gt;https://blog.crossjoin.co.uk/2015/12/15/power-bi-desktop-sort-by-column-and-dax-calculations-that-use-the-all-function/&lt;/A&gt;) that explained the "Sort ID" column would have to be added into the ALL() function in order for the measure to populate correctly for all attributes.&lt;BR /&gt;&lt;BR /&gt;Thanks!&lt;/P&gt;</description>
    <pubDate>Fri, 28 Jun 2024 16:00:48 GMT</pubDate>
    <dc:creator>palchaw</dc:creator>
    <dc:date>2024-06-28T16:00:48Z</dc:date>
    <item>
      <title>Divide all attributes into specific attribute value</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Divide-all-attributes-into-specific-attribute-value/m-p/4014178#M158129</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am creating a balance sheet financial statement output that shows line items with their actual values for each of the past three years. &lt;STRONG&gt;I need to add in a percentage column that shows how much of each attribute makes up the Total Assets&lt;/STRONG&gt;. My current matrix looks like the below.&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lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;All data is in one table "Financials" with an Attribute column that contains the descriptions of the line items (Cash, Inv, AR, etc.) and a Value column that holds the respective value for each attribute. There's also an ID column in the Financials table as there are different entities' financial statements held in the same table.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;The above table does not display data until a company in a separate matrix visual is clicked on.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My ideal output would look similar to the below.&lt;/P&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;Attribute&lt;/TD&gt;&lt;TD&gt;12/31/2021&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;12/31/2022&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;12/31/2023&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Entity 123&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Cash&lt;/TD&gt;&lt;TD&gt;3&lt;/TD&gt;&lt;TD&gt;14%&lt;/TD&gt;&lt;TD&gt;4&lt;/TD&gt;&lt;TD&gt;17%&lt;/TD&gt;&lt;TD&gt;3&lt;/TD&gt;&lt;TD&gt;12%&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Inv&lt;/TD&gt;&lt;TD&gt;4&lt;/TD&gt;&lt;TD&gt;19%&lt;/TD&gt;&lt;TD&gt;2&lt;/TD&gt;&lt;TD&gt;9%&lt;/TD&gt;&lt;TD&gt;5&lt;/TD&gt;&lt;TD&gt;19%&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;AR&lt;/TD&gt;&lt;TD&gt;5&lt;/TD&gt;&lt;TD&gt;24%&lt;/TD&gt;&lt;TD&gt;7&lt;/TD&gt;&lt;TD&gt;30%&lt;/TD&gt;&lt;TD&gt;7&lt;/TD&gt;&lt;TD&gt;27%&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;PPE&lt;/TD&gt;&lt;TD&gt;5&lt;/TD&gt;&lt;TD&gt;24%&lt;/TD&gt;&lt;TD&gt;5&lt;/TD&gt;&lt;TD&gt;22%&lt;/TD&gt;&lt;TD&gt;6&lt;/TD&gt;&lt;TD&gt;23%&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Other&lt;/TD&gt;&lt;TD&gt;4&lt;/TD&gt;&lt;TD&gt;19%&lt;/TD&gt;&lt;TD&gt;5&lt;/TD&gt;&lt;TD&gt;22%&lt;/TD&gt;&lt;TD&gt;5&lt;/TD&gt;&lt;TD&gt;19%&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Total Assets&lt;/TD&gt;&lt;TD&gt;21&lt;/TD&gt;&lt;TD&gt;100%&lt;/TD&gt;&lt;TD&gt;23&lt;/TD&gt;&lt;TD&gt;100%&lt;/TD&gt;&lt;TD&gt;26&lt;/TD&gt;&lt;TD&gt;100%&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have tried the below measure to try to have the value for "Total Assets" as a denominator which I could then divide into, but this measure only shows the value for the "Total Assets" attribute row for each year, while every other attribute's row is blank.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;__TotalBS =&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;CALCULATE&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;SUM&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;'Financials'&lt;/SPAN&gt;&lt;SPAN&gt;[Value]&lt;/SPAN&gt;&lt;SPAN&gt;),&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;'Financials'&lt;/SPAN&gt;&lt;SPAN&gt;[Attribute]&lt;/SPAN&gt;&lt;SPAN&gt; = &lt;/SPAN&gt;&lt;SPAN&gt;"Total Assets"&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Thu, 27 Jun 2024 20:22:35 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Divide-all-attributes-into-specific-attribute-value/m-p/4014178#M158129</guid>
      <dc:creator>palchaw</dc:creator>
      <dc:date>2024-06-27T20:22:35Z</dc:date>
    </item>
    <item>
      <title>Re: Divide all attributes into specific attribute value</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Divide-all-attributes-into-specific-attribute-value/m-p/4014259#M158137</link>
      <description>&lt;P&gt;To fix your measure (keeping the same dataset), i would do something like:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;__TotalBS =
CALCULATE(
    SUM('Financials'[Value]),
        ALL('Financials'[Attribute]),
        'Financials'[Attribute] = "Total Assets"
        )&lt;/LI-CODE&gt;
&lt;P&gt;Is there any reason you have total assets as an attribute?&amp;nbsp;if you get rid of the total assets attribute, and your data looks like:&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;then you can just remove that last line:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;__TotalBS =
CALCULATE(
    SUM('Financials'[Value]),
        ALL('Financials'[Attribute])
        )&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 27 Jun 2024 23:06:30 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Divide-all-attributes-into-specific-attribute-value/m-p/4014259#M158137</guid>
      <dc:creator>vicky_</dc:creator>
      <dc:date>2024-06-27T23:06:30Z</dc:date>
    </item>
    <item>
      <title>Re: Divide all attributes into specific attribute value</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Divide-all-attributes-into-specific-attribute-value/m-p/4016012#M158286</link>
      <description>&lt;P&gt;This measure helped, thank you.&lt;BR /&gt;&lt;BR /&gt;At first, it was still coming up with the blank error where the measure only populated a value for "Total Assets" when I tried this on my live data that looks similar to the example data in my forum question. So I recreated the example data in my file and your measure worked perfectly. I ended up building my live table from scratch and found that when I did a custom sort on Attribute by a different column "Sort ID", that's when the measure went blank. I found a link (&lt;A href="https://blog.crossjoin.co.uk/2015/12/15/power-bi-desktop-sort-by-column-and-dax-calculations-that-use-the-all-function/" target="_blank"&gt;https://blog.crossjoin.co.uk/2015/12/15/power-bi-desktop-sort-by-column-and-dax-calculations-that-use-the-all-function/&lt;/A&gt;) that explained the "Sort ID" column would have to be added into the ALL() function in order for the measure to populate correctly for all attributes.&lt;BR /&gt;&lt;BR /&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Fri, 28 Jun 2024 16:00:48 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Divide-all-attributes-into-specific-attribute-value/m-p/4016012#M158286</guid>
      <dc:creator>palchaw</dc:creator>
      <dc:date>2024-06-28T16:00:48Z</dc:date>
    </item>
  </channel>
</rss>

