<?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: Variables Dax in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Variables-Dax/m-p/2663975#M79079</link>
    <description>&lt;P&gt;Hi&amp;nbsp;Anonymous&lt;/LI-USER&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Has this question been solved? If amitchandak's answer is helpful, please consider marking his answer as a solution, which will help more people find the answer faster. If the problem is not resolved, please consider publishing some sample data. Thanks in advance!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT size="2"&gt;Best Regards,&lt;BR /&gt;Gao&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;Community Support Team&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT size="2"&gt;If there is any post&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;FONT size="3" color="#FF0000" data-darkreader-inline-color=""&gt;&lt;EM&gt;&lt;STRONG&gt;helps&lt;/STRONG&gt;&lt;/EM&gt;&lt;/FONT&gt;, then please consider&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;FONT size="3"&gt;&lt;FONT color="#FF0000" data-darkreader-inline-color=""&gt;&lt;EM&gt;&lt;STRONG&gt;Accept it as the solution&lt;/STRONG&gt;&lt;/EM&gt;&lt;/FONT&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/FONT&gt;to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please feel free to let us know.&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;EM&gt;&lt;STRONG&gt;&lt;FONT size="3"&gt;Thanks a lot!&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/EM&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT size="2" color="#FF0000" data-darkreader-inline-color=""&gt;&lt;A href="https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490" target="_blank" rel="noopener"&gt;&lt;SPAN&gt;How to get your questions answered quickly&lt;/SPAN&gt;&lt;/A&gt;&lt;SPAN&gt;&amp;nbsp;--&amp;nbsp;&lt;/SPAN&gt;&lt;A href="https://community.powerbi.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-Forum/ba-p/963216" target="_blank" rel="noopener"&gt;&lt;SPAN&gt;How to provide sample data&lt;/SPAN&gt;&lt;/A&gt;&lt;/FONT&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 27 Jul 2022 07:03:08 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2022-07-27T07:03:08Z</dc:date>
    <item>
      <title>Variables Dax</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Variables-Dax/m-p/2616306#M76084</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I&amp;nbsp; have the following VAR DAX which is trying to work out the variance between Actuals and Budget.&amp;nbsp;&lt;/P&gt;&lt;P&gt;There are 3 VAR :&lt;/P&gt;&lt;P&gt;Var Actual, Budget, Result. When I return Actual and budget seperately they work but I am unable to go Result = Actual - Budget?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is anyone can assist would be great. Thanks in advance.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Variances =&lt;BR /&gt;VAR LineItem =&lt;BR /&gt;SELECTEDVALUE ( 'P&amp;amp;L Template'[Lookup Column] )&lt;BR /&gt;VAR Actuals =&amp;nbsp;SWITCH (&amp;nbsp;TRUE (),&lt;BR /&gt;LineItem = "Revenue - Secured", DIVIDE ( 'Key measures'[Revenue - Secured], 1000, 0 ),&lt;BR /&gt;LineItem = "COGS - Secured", DIVIDE ( 'Key measures'[COGS - Secured], 1000, 0 ),&lt;BR /&gt;LineItem = "Gross Margin - Secured", DIVIDE ( 'Key measures'[Gross Margin - Secured], 1000, 0 ),&lt;BR /&gt;LineItem = "Revenue - Pipeline", DIVIDE ( 'Key measures'[Revenue - Pipeline], 1000, 0 ),&lt;BR /&gt;LineItem = "COGS - Pipeline", DIVIDE ( 'Key measures'[COGS - Pipeline], 1000, 0 ),&lt;BR /&gt;LineItem = "Gross Margin - Pipeline", DIVIDE ( 'Key measures'[Gross Margin - Pipeline], 1000, 0 ),&lt;BR /&gt;LineItem = "Gross Margin - Blue Sky", DIVIDE ( 'Key measures'[Gross Margin - Blue Sky], 1000, 0 ),&lt;BR /&gt;LineItem = "COGS - Blue Sky", DIVIDE ( 'Key measures'[COGS - Blue Sky], 1000, 0 ),&lt;BR /&gt;LineItem = "Total Revenue", DIVIDE ( 'Key measures'[Actual Total Revenue], 1000, 0 ),&lt;BR /&gt;LineItem = "Total COGS", DIVIDE ( 'Key measures'[Total COGS], 1000, 0 ),&lt;BR /&gt;LineItem = "Total Gross Margin", DIVIDE ( 'Key measures'[Total Gross Margin], 1000, 0 ),&lt;BR /&gt;LineItem = "Other Revenue", DIVIDE ( 'Key measures'[Other Revenue], 1000, 0 ),&lt;BR /&gt;LineItem = "Total Cost Of Goods Sold", DIVIDE ( 'Key measures'[Total Cost of Goods Sold], 1000, 0 ),&lt;BR /&gt;LineItem = "Gross Margin from Trading", DIVIDE ( 'Key measures'[Gross Margin from Trading], 1000, 0 ),&lt;BR /&gt;LineItem = "Blue Collar Labour Costs", DIVIDE ( 'Key measures'[Blue Collar Labour Costs], 1000, 0 ),&lt;BR /&gt;LineItem = "Total Direct Costs", DIVIDE ( 'Key measures'[Total Direct Costs], 1000, 0 ),&lt;BR /&gt;LineItem = "Monthly Salary Costs", DIVIDE ( 'Key measures'[Monthly Salary Costs], 1000, 0 ),&lt;BR /&gt;LineItem = "Indirect Variable Costs", DIVIDE ( 'Key measures'[Indirect Variable Costs], 1000, 0 ),&lt;BR /&gt;LineItem = "Indirect Fixed Costs", DIVIDE ( 'Key measures'[Indirect Fixed Costs], 1000, 0 ),&lt;BR /&gt;LineItem = "Total Recharges", DIVIDE ( 'Key measures'[Total Recharges], 1000, 0 ),&lt;BR /&gt;LineItem = "Total Overhead Cost", DIVIDE ( 'Key measures'[Total Overhead Costs], 1000, 0 ),&lt;BR /&gt;LineItem = "(Under)/ Over Recoveries", DIVIDE ( 'Key measures'[(Under) / Over Recoveries], 1000, 0 ),&lt;BR /&gt;LineItem = "EBIT", DIVIDE ( 'Key measures'[Actual EBIT], 1000, 0 ),&lt;BR /&gt;LineItem = "", 'Key measures'[Blank],&lt;BR /&gt;CALCULATE (&lt;BR /&gt;DIVIDE ( [Fin Actuals], 1000, 0 ),&lt;BR /&gt;FILTER ( 'P&amp;amp;LData', 'P&amp;amp;LData'[Category DP] = LineItem )&lt;BR /&gt;)&lt;BR /&gt;)&lt;BR /&gt;VAR Budget =&amp;nbsp;SWITCH (&amp;nbsp;TRUE (),&lt;BR /&gt;LineItem = "Gross Margin - Secured", DIVIDE ( 'Key measures'[B GM - Secured], 1000 ),&lt;BR /&gt;LineItem = "Gross Margin - Pipeline", DIVIDE ( 'Key measures'[B GM - Pipeline], 1000 ),&lt;BR /&gt;LineItem = "Gross Margin - Blue Sky", DIVIDE ( 'Key measures'[B GM - BlueSkye], 1000 ),&lt;BR /&gt;LineItem = "Total Revenue", DIVIDE ( 'Key measures'[B Total Revenue], 1000 ),&lt;BR /&gt;LineItem = "Total COGS", DIVIDE ( 'Key measures'[B Total COGS], 1000 ),&lt;BR /&gt;LineItem = "Total Gross Margin", DIVIDE ( 'Key measures'[B Total GM], 1000 ),&lt;BR /&gt;LineItem = "Other Revenue", DIVIDE ( 'Key measures'[B Other Revenue], 1000 ),&lt;BR /&gt;LineItem = "Total Cost Of Goods Sold", DIVIDE ( 'Key measures'[B Total Cost Of Goods Sold], 1000 ),&lt;BR /&gt;LineItem = "Gross Margin from Trading", DIVIDE ( 'Key measures'[B GM from Trading], 1000 ),&lt;BR /&gt;LineItem = "Blue Collar Labour Costs", DIVIDE ( 'Key measures'[B Blue Collar Labour Costs], 1000 ),&lt;BR /&gt;LineItem = "Total Direct Costs", DIVIDE ( 'Key measures'[B Total Direct Costs], 1000 ),&lt;BR /&gt;LineItem = "Monthly Salary Costs", DIVIDE ( 'Key measures'[B Monthly Salary Costs], 1000 ),&lt;BR /&gt;LineItem = "Indirect Variable Costs", DIVIDE ( 'Key measures'[B Indirect Variable Costs], 1000 ),&lt;BR /&gt;LineItem = "Indirect Fixed Costs", DIVIDE ( 'Key measures'[B Indirect Fixed Costs], 1000 ),&lt;BR /&gt;LineItem = "Total Recharges", DIVIDE ( 'Key measures'[B Total Recharges], 1000 ),&lt;BR /&gt;LineItem = "Total Overhead Cost", DIVIDE ( 'Key measures'[B Total Overhead Cost], 1000 ),&lt;BR /&gt;LineItem = "(Under)/ Over Recoveries", DIVIDE ( 'Key measures'[B (Under) Over Recoveries], 1000 ),&lt;BR /&gt;LineItem = "EBIT", DIVIDE ( 'Key measures'[Budget EBIT], 1000 ),&lt;BR /&gt;LineItem = "", 'Key measures'[Blank],&lt;BR /&gt;CALCULATE (&lt;BR /&gt;DIVIDE ( [B Amount], 1000 ),&lt;BR /&gt;FILTER ( 'Budgets', 'Budgets'[Lookup Line Item] = LineItem )&lt;BR /&gt;)&lt;BR /&gt;)&lt;BR /&gt;VAR Result = Actuals - Budget&lt;BR /&gt;RETURN&lt;BR /&gt;Result&lt;/P&gt;</description>
      <pubDate>Mon, 04 Jul 2022 05:12:37 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Variables-Dax/m-p/2616306#M76084</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-07-04T05:12:37Z</dc:date>
    </item>
    <item>
      <title>Re: Variables Dax</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Variables-Dax/m-p/2616523#M76093</link>
      <description>&lt;P&gt;Anonymous&lt;/LI-USER&gt; , Try Result like&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;VAR Result =&amp;nbsp; Sumx(values( 'P&amp;amp;L Template'[Lookup Column] ), Actuals - Budget)&lt;/P&gt;</description>
      <pubDate>Mon, 04 Jul 2022 07:11:37 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Variables-Dax/m-p/2616523#M76093</guid>
      <dc:creator>amitchandak</dc:creator>
      <dc:date>2022-07-04T07:11:37Z</dc:date>
    </item>
    <item>
      <title>Re: Variables Dax</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Variables-Dax/m-p/2663975#M79079</link>
      <description>&lt;P&gt;Hi&amp;nbsp;Anonymous&lt;/LI-USER&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Has this question been solved? If amitchandak's answer is helpful, please consider marking his answer as a solution, which will help more people find the answer faster. If the problem is not resolved, please consider publishing some sample data. Thanks in advance!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT size="2"&gt;Best Regards,&lt;BR /&gt;Gao&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;Community Support Team&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT size="2"&gt;If there is any post&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;FONT size="3" color="#FF0000" data-darkreader-inline-color=""&gt;&lt;EM&gt;&lt;STRONG&gt;helps&lt;/STRONG&gt;&lt;/EM&gt;&lt;/FONT&gt;, then please consider&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;FONT size="3"&gt;&lt;FONT color="#FF0000" data-darkreader-inline-color=""&gt;&lt;EM&gt;&lt;STRONG&gt;Accept it as the solution&lt;/STRONG&gt;&lt;/EM&gt;&lt;/FONT&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/FONT&gt;to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please feel free to let us know.&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;EM&gt;&lt;STRONG&gt;&lt;FONT size="3"&gt;Thanks a lot!&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/EM&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT size="2" color="#FF0000" data-darkreader-inline-color=""&gt;&lt;A href="https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490" target="_blank" rel="noopener"&gt;&lt;SPAN&gt;How to get your questions answered quickly&lt;/SPAN&gt;&lt;/A&gt;&lt;SPAN&gt;&amp;nbsp;--&amp;nbsp;&lt;/SPAN&gt;&lt;A href="https://community.powerbi.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-Forum/ba-p/963216" target="_blank" rel="noopener"&gt;&lt;SPAN&gt;How to provide sample data&lt;/SPAN&gt;&lt;/A&gt;&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 27 Jul 2022 07:03:08 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Variables-Dax/m-p/2663975#M79079</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-07-27T07:03:08Z</dc:date>
    </item>
  </channel>
</rss>

