<?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: DAX CALCULATE ERROR in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-CALCULATE-ERROR/m-p/2581504#M74080</link>
    <description>&lt;P&gt;you can't calculate a colnum, it need to be a measure, like sum the colnum or ave the colnum&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;SUM of SKU ACT Volume Share % by Category Static = CALCULATE(Sum(Worksheet[SKU ACT Volume % Share]), ALLEXCEPT(Worksheet, Worksheet[Month], Worksheet[Category]))&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 16 Jun 2022 00:10:25 GMT</pubDate>
    <dc:creator>vapid128</dc:creator>
    <dc:date>2022-06-16T00:10:25Z</dc:date>
    <item>
      <title>DAX CALCULATE ERROR</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-CALCULATE-ERROR/m-p/2581488#M74078</link>
      <description>&lt;P&gt;Hello, I have the following problem.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a measure built in DAX called Share % SKU ACT Volume, it is the percentage participation that each SKU has in the total ACT Volume, with that measure I have no problem.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Now I need to build a SUMIF that calculates the Share % SKU ACT Volume grouped by category for which I am using CALCULATE. So far I managed to build a code that brings me the correct result but when I apply the region filter or any filter, the result is static.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;my code is as follows:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;SUM of SKU ACT Volume Share % by Category Static = CALCULATE(Worksheet[SKU ACT Volume % Share], ALLEXCEPT(Worksheet, Worksheet[Month], Worksheet[Category]))&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I understand that the result is static because I am using ALLEXCEPT, so he tried to set my CALCULATE in such a way that my result changes and is correct according to the applied filters.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So I come up with the following code:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;SUM of Share % SKU ACT Volume by category = CALCULATE(Worksheet[Share % SKU ACT Volume], ALLSELECTED(Worksheet), VALUES(Worksheet[Month]), VALUES(Worksheet[Category]))&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The result I get is incorrect, my intention is to get to the result of the measure SUM of SKU ACT Volume Share % by Category Static but that the result changes according to the applied filters.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How can I achieve it?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Share PBI File&amp;nbsp;&lt;A href="https://1drv.ms/u/s!AgYZFTdxng_ugQUUWaqsSrdhlVWj?e=S69YbF" target="_self"&gt;PBI FILE&lt;/A&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 15 Jun 2022 23:53:42 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-CALCULATE-ERROR/m-p/2581488#M74078</guid>
      <dc:creator>mlozano</dc:creator>
      <dc:date>2022-06-15T23:53:42Z</dc:date>
    </item>
    <item>
      <title>Re: DAX CALCULATE ERROR</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-CALCULATE-ERROR/m-p/2581504#M74080</link>
      <description>&lt;P&gt;you can't calculate a colnum, it need to be a measure, like sum the colnum or ave the colnum&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;SUM of SKU ACT Volume Share % by Category Static = CALCULATE(Sum(Worksheet[SKU ACT Volume % Share]), ALLEXCEPT(Worksheet, Worksheet[Month], Worksheet[Category]))&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 16 Jun 2022 00:10:25 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-CALCULATE-ERROR/m-p/2581504#M74080</guid>
      <dc:creator>vapid128</dc:creator>
      <dc:date>2022-06-16T00:10:25Z</dc:date>
    </item>
    <item>
      <title>Re: DAX CALCULATE ERROR</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-CALCULATE-ERROR/m-p/2581507#M74082</link>
      <description>&lt;P&gt;A calculated column would contain static values ​​and I need my result to change as I apply filters on the report.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;To add the measure I must create another measure with a SUMX to force the context of the row but before doing so I must obtain the correct values ​​from my calculate&lt;/P&gt;</description>
      <pubDate>Thu, 16 Jun 2022 00:15:53 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-CALCULATE-ERROR/m-p/2581507#M74082</guid>
      <dc:creator>mlozano</dc:creator>
      <dc:date>2022-06-16T00:15:53Z</dc:date>
    </item>
    <item>
      <title>Re: DAX CALCULATE ERROR</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-CALCULATE-ERROR/m-p/2581547#M74085</link>
      <description>&lt;P&gt;OKOK&lt;/P&gt;&lt;P&gt;I download you file.&lt;/P&gt;&lt;P&gt;So... you want calculate ACT Volume&amp;nbsp;Share % for each SKU ID base on&amp;nbsp;colnum Month and colnum&amp;nbsp;Category. And sum all those number become 100%&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;like this&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Measure = AVERAGEX(
    VALUES(Worksheet[index]),
    CALCULATE(
        DIVIDE(
            SUM([ACT Volume]),
            CALCULATE(
                SUM([ACT Volume]),
                REMOVEFILTERS(Worksheet[SKU ID])
            )
        )
    )
)&lt;/LI-CODE&gt;&lt;LI-CODE lang="markup"&gt;index = [Month]&amp;amp;[Category]&lt;/LI-CODE&gt;</description>
      <pubDate>Thu, 16 Jun 2022 01:01:47 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-CALCULATE-ERROR/m-p/2581547#M74085</guid>
      <dc:creator>vapid128</dc:creator>
      <dc:date>2022-06-16T01:01:47Z</dc:date>
    </item>
    <item>
      <title>Re: DAX CALCULATE ERROR</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-CALCULATE-ERROR/m-p/2581610#M74092</link>
      <description>&lt;P&gt;Thanks for your answer. It is not what I need, the participation percentage is already calculated, which is the Share % SKU ACT Volume measure, now what I have to do is, that measure, which is my participation percentage, include it in a calculate that groups it by month and category .&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So if you can see with the following code:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;SUM of Share % SKU ACT Volume by category Static = CALCULATE(Worksheet[Share % SKU ACT Volume], ALLEXCEPT(Worksheet, Worksheet[Month], Worksheet[Category]))&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Result&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Without filters&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;It has the result that I expect, what happens is that this result is not dynamic since I apply the region filter and it is the same all the time, what I need is to get that result and that it fits to the granularity defined by the filters.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;With filters&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The expected result would be the distribution of 100% that represents the total of my participation among my four categories and that this be dynamic every time I change the region filter.&lt;/P&gt;</description>
      <pubDate>Thu, 16 Jun 2022 01:39:57 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-CALCULATE-ERROR/m-p/2581610#M74092</guid>
      <dc:creator>mlozano</dc:creator>
      <dc:date>2022-06-16T01:39:57Z</dc:date>
    </item>
    <item>
      <title>Re: DAX CALCULATE ERROR</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-CALCULATE-ERROR/m-p/2581718#M74099</link>
      <description>&lt;P&gt;I solved it like this:&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;VAR Numerator = CALCULATE(SUM(Worksheet[ACT Volume]), ALLSELECTED(Worksheet), VALUES(Worksheet[Month]),VALUES(Worksheet[Category]))

VAR Denominator = CALCULATE(SUM(Worksheet[ACT Volume]), ALLSELECTED(Worksheet))

RETURN

DIVIDE(Numerator, Denominator)
&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 16 Jun 2022 03:53:34 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-CALCULATE-ERROR/m-p/2581718#M74099</guid>
      <dc:creator>mlozano</dc:creator>
      <dc:date>2022-06-16T03:53:34Z</dc:date>
    </item>
  </channel>
</rss>

