<?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 Trying to calculate adherence with the plan output vs the actual output in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Trying-to-calculate-adherence-with-the-plan-output-vs-the-actual/m-p/3379530#M127311</link>
    <description>&lt;P&gt;Hi everyone,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I need some help trying to calculate the adherence of the plan with the actual output. This is an example of what i've been trying to do in powerbi.&amp;nbsp;&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;3500&lt;/TD&gt;&lt;TD&gt;13.48%&lt;/TD&gt;&lt;TD&gt;4,080&lt;/TD&gt;&lt;TD&gt;11.25%&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;7100&lt;/TD&gt;&lt;TD&gt;27.35%&lt;/TD&gt;&lt;TD&gt;6866&lt;/TD&gt;&lt;TD&gt;26.45%&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;15360&lt;/TD&gt;&lt;TD&gt;59.17%&lt;/TD&gt;&lt;TD&gt;13299&lt;/TD&gt;&lt;TD&gt;51.23%&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;100.00%&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;88.93%&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;the second column perform the following calculation A1/SUM(A$1:A$3). basically is a division between whatever is in the A cell and the total amount of the A column.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;and the 4th column calculate the following ecuation&amp;nbsp;IF((D2/B2)&amp;lt;=1,(D2/B2)*C2,(1-((D2/B2)-1))*C2).&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I create the three following measure&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;aver%output =&lt;/P&gt;&lt;P&gt;SUM('MFG QA Man (2)'[Actual Output])/ SUM('MFG QA Man (2)'[Plan Output])&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;TotalVolume = &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;DIVIDE&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;SUM&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;'MFG QA Man (2)'&lt;/SPAN&gt;&lt;SPAN&gt;[Plan Output]&lt;/SPAN&gt;&lt;SPAN&gt;), &lt;/SPAN&gt;&lt;SPAN&gt;CALCULATE&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;SUM&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;'MFG QA Man (2)'&lt;/SPAN&gt;&lt;SPAN&gt;[Plan Output]&lt;/SPAN&gt;&lt;SPAN&gt;), &lt;/SPAN&gt;&lt;SPAN&gt;ALLSELECTED&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;'MFG QA Man (2)'&lt;/SPAN&gt;&lt;SPAN&gt;)))&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Adherencia = &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;VAR&lt;/SPAN&gt;&lt;SPAN&gt; Porcentaje = ('MFG QA Man (2)'[aver%output])&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;VAR&lt;/SPAN&gt;&lt;SPAN&gt; Resultado = &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;SWITCH&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;TRUE&lt;/SPAN&gt;&lt;SPAN&gt;(), Porcentaje &amp;lt;= &lt;/SPAN&gt;&lt;SPAN&gt;1&lt;/SPAN&gt;&lt;SPAN&gt;, Porcentaje * 'MFG QA Man (2)'[TotalVolume], Porcentaje &amp;gt; &lt;/SPAN&gt;&lt;SPAN&gt;1&lt;/SPAN&gt;&lt;SPAN&gt;, (&lt;/SPAN&gt;&lt;SPAN&gt;1&lt;/SPAN&gt;&lt;SPAN&gt; - (Porcentaje - &lt;/SPAN&gt;&lt;SPAN&gt;1&lt;/SPAN&gt;&lt;SPAN&gt;)) * 'MFG QA Man (2)'[TotalVolume])&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;RETURN&lt;/SPAN&gt;&lt;SPAN&gt; Resultado&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;The problem is when the power bi perform the calculation of the adherence its doing the sum of the total adherence wrong&amp;nbsp;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;img /&gt;&lt;P&gt;the total should be 88.93% instead of 93.39% and i dont know what else to do.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;PS. Sorry for bad english&amp;nbsp;&lt;/P&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
    <pubDate>Mon, 14 Aug 2023 18:38:59 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2023-08-14T18:38:59Z</dc:date>
    <item>
      <title>Trying to calculate adherence with the plan output vs the actual output</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Trying-to-calculate-adherence-with-the-plan-output-vs-the-actual/m-p/3379530#M127311</link>
      <description>&lt;P&gt;Hi everyone,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I need some help trying to calculate the adherence of the plan with the actual output. This is an example of what i've been trying to do in powerbi.&amp;nbsp;&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;3500&lt;/TD&gt;&lt;TD&gt;13.48%&lt;/TD&gt;&lt;TD&gt;4,080&lt;/TD&gt;&lt;TD&gt;11.25%&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;7100&lt;/TD&gt;&lt;TD&gt;27.35%&lt;/TD&gt;&lt;TD&gt;6866&lt;/TD&gt;&lt;TD&gt;26.45%&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;15360&lt;/TD&gt;&lt;TD&gt;59.17%&lt;/TD&gt;&lt;TD&gt;13299&lt;/TD&gt;&lt;TD&gt;51.23%&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;100.00%&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;88.93%&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;the second column perform the following calculation A1/SUM(A$1:A$3). basically is a division between whatever is in the A cell and the total amount of the A column.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;and the 4th column calculate the following ecuation&amp;nbsp;IF((D2/B2)&amp;lt;=1,(D2/B2)*C2,(1-((D2/B2)-1))*C2).&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I create the three following measure&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;aver%output =&lt;/P&gt;&lt;P&gt;SUM('MFG QA Man (2)'[Actual Output])/ SUM('MFG QA Man (2)'[Plan Output])&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;TotalVolume = &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;DIVIDE&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;SUM&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;'MFG QA Man (2)'&lt;/SPAN&gt;&lt;SPAN&gt;[Plan Output]&lt;/SPAN&gt;&lt;SPAN&gt;), &lt;/SPAN&gt;&lt;SPAN&gt;CALCULATE&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;SUM&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;'MFG QA Man (2)'&lt;/SPAN&gt;&lt;SPAN&gt;[Plan Output]&lt;/SPAN&gt;&lt;SPAN&gt;), &lt;/SPAN&gt;&lt;SPAN&gt;ALLSELECTED&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;'MFG QA Man (2)'&lt;/SPAN&gt;&lt;SPAN&gt;)))&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Adherencia = &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;VAR&lt;/SPAN&gt;&lt;SPAN&gt; Porcentaje = ('MFG QA Man (2)'[aver%output])&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;VAR&lt;/SPAN&gt;&lt;SPAN&gt; Resultado = &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;SWITCH&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;TRUE&lt;/SPAN&gt;&lt;SPAN&gt;(), Porcentaje &amp;lt;= &lt;/SPAN&gt;&lt;SPAN&gt;1&lt;/SPAN&gt;&lt;SPAN&gt;, Porcentaje * 'MFG QA Man (2)'[TotalVolume], Porcentaje &amp;gt; &lt;/SPAN&gt;&lt;SPAN&gt;1&lt;/SPAN&gt;&lt;SPAN&gt;, (&lt;/SPAN&gt;&lt;SPAN&gt;1&lt;/SPAN&gt;&lt;SPAN&gt; - (Porcentaje - &lt;/SPAN&gt;&lt;SPAN&gt;1&lt;/SPAN&gt;&lt;SPAN&gt;)) * 'MFG QA Man (2)'[TotalVolume])&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;RETURN&lt;/SPAN&gt;&lt;SPAN&gt; Resultado&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;The problem is when the power bi perform the calculation of the adherence its doing the sum of the total adherence wrong&amp;nbsp;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;img /&gt;&lt;P&gt;the total should be 88.93% instead of 93.39% and i dont know what else to do.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;PS. Sorry for bad english&amp;nbsp;&lt;/P&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Mon, 14 Aug 2023 18:38:59 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Trying-to-calculate-adherence-with-the-plan-output-vs-the-actual/m-p/3379530#M127311</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-08-14T18:38:59Z</dc:date>
    </item>
    <item>
      <title>Re: Trying to calculate adherence with the plan output vs the actual output</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Trying-to-calculate-adherence-with-the-plan-output-vs-the-actual/m-p/3381565#M127417</link>
      <description>&lt;P&gt;Hi Rosarie9, welcome to the community! &lt;span class="lia-unicode-emoji" title=":smiling_face_with_smiling_eyes:"&gt;😊&lt;/span&gt;&lt;/P&gt;&lt;P&gt;It seems like you're trying to calculate the adherence of the plan with the actual output using Power BI. From your description, it looks like you have created three measures: `aver%output`, `TotalVolume`, and `Adherencia`. However, the total adherence calculated by Power BI is not matching your expected result.&lt;/P&gt;&lt;P&gt;One possible solution to this issue could be to check the calculations used in your measures and make sure they are correct. You could also try breaking down the calculations into smaller parts to see if each part is returning the expected result.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It seems like you have created three measures: `aver%output`, `TotalVolume`, and `Adherencia`. However, the total adherence calculated by Power BI is not matching your expected result.&lt;/P&gt;&lt;P&gt;One possible solution to this issue could be to check the calculations used in your measures and make sure they are correct. You could also try breaking down the calculations into smaller parts to see if each part is returning the expected result.&lt;/P&gt;&lt;P&gt;Another approach could be to use the `CALCULATE` function in Power BI, which allows you to perform calculations on a filtered version of your data. You can find more information about the `CALCULATE` function in this [DAX tutorial].&lt;/P&gt;&lt;P&gt;If you're still having trouble, you could try posting your question on the [Microsoft Fabric Community] or [Power BI Community] forums, where other users might be able to help you with your specific issue.&lt;/P&gt;&lt;P&gt;I hope this helps! Let me know if you have any further questions. &lt;span class="lia-unicode-emoji" title=":smiling_face_with_smiling_eyes:"&gt;😊&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 16 Aug 2023 01:25:49 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Trying-to-calculate-adherence-with-the-plan-output-vs-the-actual/m-p/3381565#M127417</guid>
      <dc:creator>Alef_Ricardo_</dc:creator>
      <dc:date>2023-08-16T01:25:49Z</dc:date>
    </item>
    <item>
      <title>Re: Trying to calculate adherence with the plan output vs the actual output</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Trying-to-calculate-adherence-with-the-plan-output-vs-the-actual/m-p/3381738#M127428</link>
      <description>&lt;P&gt;Hi&amp;nbsp;Anonymous&lt;/LI-USER&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;It seems that the sum of the MEASURES is not correct.&lt;/P&gt;
&lt;P&gt;Please create measures based on the&amp;nbsp;&lt;SPAN&gt;Adherencia.&lt;/SPAN&gt;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;VALUE_ =
VAR _a = 'table'[Adherencia]
VAR _b =
    SUMMARIZE ( 'table', 'table'[date], "aaa", 'Product'[Adherencia] )
RETURN
    IF ( ISINSCOPE ( 'table'[date] ), _a, SUMX ( _b, [aaa] ) )
&lt;/LI-CODE&gt;
&lt;P&gt;Or you can change the 'table'[date] to the unique value in the table like the index.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490" target="_blank"&gt;How to Get Your Question Answered Quickly&lt;/A&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If it does not help, please provide more details with your desired output and pbix file without privacy information (or some sample data) .&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards&lt;BR /&gt;Community Support Team _ Rongtie&lt;/P&gt;
&lt;P&gt;If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 16 Aug 2023 02:30:41 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Trying-to-calculate-adherence-with-the-plan-output-vs-the-actual/m-p/3381738#M127428</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-08-16T02:30:41Z</dc:date>
    </item>
  </channel>
</rss>

