<?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: Measure query in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Measure-query/m-p/4010239#M157792</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;Please try something like below.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Margin =
DIVIDE (
    SUMX (
        'Module Sales with Inventory',
        'Module Sales with Inventory'[amount] - 'Module Sales with Inventory'[cost amount]
    ),
    SUMX ( 'Module Sales with Inventory', 'Module Sales with Inventory'[amount] )
) * 100
&lt;/LI-CODE&gt;</description>
    <pubDate>Wed, 26 Jun 2024 03:07:44 GMT</pubDate>
    <dc:creator>Jihwan_Kim</dc:creator>
    <dc:date>2024-06-26T03:07:44Z</dc:date>
    <item>
      <title>Measure query</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Measure-query/m-p/4010128#M157778</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm trying to write a measure that calculates the margin.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I wrote the code and am getting the following error:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;A single value for column 'amount' in table 'Module Sales with Inventory' cannot be determined. This can happen when a measure formula refers to a column that contains many values without specifying an aggregation such as min, max, count, or sum to get a single result.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have attached the measure below. Any help would be greatly appreciated.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Margin =&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;DIVIDE&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;'Module Sales with Inventory'&lt;/SPAN&gt;&lt;SPAN&gt;[amount]&lt;/SPAN&gt;&lt;SPAN&gt; - &lt;/SPAN&gt;&lt;SPAN&gt;'Module Sales with Inventory'&lt;/SPAN&gt;&lt;SPAN&gt;[cost amount]&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;'Module Sales with Inventory'&lt;/SPAN&gt;&lt;SPAN&gt;[amount]&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;) * &lt;/SPAN&gt;&lt;SPAN&gt;100&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 26 Jun 2024 02:01:49 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Measure-query/m-p/4010128#M157778</guid>
      <dc:creator>gbarr12345</dc:creator>
      <dc:date>2024-06-26T02:01:49Z</dc:date>
    </item>
    <item>
      <title>Re: Measure query</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Measure-query/m-p/4010239#M157792</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;Please try something like below.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Margin =
DIVIDE (
    SUMX (
        'Module Sales with Inventory',
        'Module Sales with Inventory'[amount] - 'Module Sales with Inventory'[cost amount]
    ),
    SUMX ( 'Module Sales with Inventory', 'Module Sales with Inventory'[amount] )
) * 100
&lt;/LI-CODE&gt;</description>
      <pubDate>Wed, 26 Jun 2024 03:07:44 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Measure-query/m-p/4010239#M157792</guid>
      <dc:creator>Jihwan_Kim</dc:creator>
      <dc:date>2024-06-26T03:07:44Z</dc:date>
    </item>
    <item>
      <title>Re: Measure query</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Measure-query/m-p/4012178#M157989</link>
      <description>&lt;P&gt;That seems to have worked!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you so much!&lt;/P&gt;</description>
      <pubDate>Thu, 27 Jun 2024 01:10:53 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Measure-query/m-p/4012178#M157989</guid>
      <dc:creator>gbarr12345</dc:creator>
      <dc:date>2024-06-27T01:10:53Z</dc:date>
    </item>
  </channel>
</rss>

