<?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 % for measure in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/for-measure/m-p/1918531#M41580</link>
    <description>&lt;P&gt;Hello&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have the following measure&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Requested cost = CALCULATE(SUMX(Table,[Cost]*[Requested qty]))&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;The following measure looks in a table like this&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;img /&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I just need adding the percetage to each of the items. In case of the order number the percetage should be 100%&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please advise&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Omar Octaviano&lt;/P&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
    <pubDate>Wed, 23 Jun 2021 22:42:12 GMT</pubDate>
    <dc:creator>ooctaviano</dc:creator>
    <dc:date>2021-06-23T22:42:12Z</dc:date>
    <item>
      <title>% for measure</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/for-measure/m-p/1918531#M41580</link>
      <description>&lt;P&gt;Hello&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have the following measure&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Requested cost = CALCULATE(SUMX(Table,[Cost]*[Requested qty]))&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;The following measure looks in a table like this&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;img /&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I just need adding the percetage to each of the items. In case of the order number the percetage should be 100%&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please advise&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Omar Octaviano&lt;/P&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Wed, 23 Jun 2021 22:42:12 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/for-measure/m-p/1918531#M41580</guid>
      <dc:creator>ooctaviano</dc:creator>
      <dc:date>2021-06-23T22:42:12Z</dc:date>
    </item>
    <item>
      <title>Re: % for measure</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/for-measure/m-p/1918551#M41584</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="266183" data-lia-user-login="ooctaviano" class="lia-mention lia-mention-user"&gt;ooctaviano&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Writing DAX code needs to follow some generally accepted rules (just like in Python) so that people are able to tell at a glance whether they see a measure or a column. From your code it's not at all clear whether&amp;nbsp;&lt;SPAN&gt;[Cost] and [Requested qty] are measures or columns in the table.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I'd suggest reading this guide on DAX formatting rules:&amp;nbsp;&lt;A href="https://www.sqlbi.com/articles/rules-for-dax-code-formatting/" target="_blank"&gt;Rules for DAX Code Formatting - SQLBI&lt;/A&gt;&amp;nbsp;and sticking to them religiously.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Please bear in mind that if you iterate a fact table through an aggregator (like SUMX, for instance) you should never invoke a measure in the second argument unless you want to 1) have a model that's agonizingly slow and/or 2) produce wrong figures in a somewhat random fashion. What's worse, you won't be even able to spot the problem.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Also, I anticipate that your model is a single-table one (if not, then ignore this remark but still watch the video). If you want to see what &lt;STRONG&gt;really bad things&lt;/STRONG&gt; can happen in this case, please watch this video:&amp;nbsp;&lt;A href="https://www.youtube.com/watch?v=aRntX-HiiN8" target="_blank"&gt;(1) Auto-exist on clusters or numbers - Unplugged #22 - YouTube&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;To be able to write a good formula for what you want, you have to show the model and also say what you want to see at the grand total.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 23 Jun 2021 23:03:53 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/for-measure/m-p/1918551#M41584</guid>
      <dc:creator>daxer-almighty</dc:creator>
      <dc:date>2021-06-23T23:03:53Z</dc:date>
    </item>
  </channel>
</rss>

