<?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: Budget, actual and variance matrix in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Budget-actual-and-variance-matrix/m-p/5148567#M187737</link>
    <description>&lt;P&gt;The problem is SELECTEDVALUE, it only returns a value when exactly one row exists in filter context, which is why totals return blank and values appear in wrong rows. It is not the right function for a budget measure in a matrix.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Use this instead:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;MeasBudget Correct =
SUM ( 'Consolidated for Power BI'[Value] )
&lt;/LI-CODE&gt;</description>
    <pubDate>Tue, 14 Apr 2026 18:40:33 GMT</pubDate>
    <dc:creator>cengizhanarslan</dc:creator>
    <dc:date>2026-04-14T18:40:33Z</dc:date>
    <item>
      <title>Budget, actual and variance matrix</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Budget-actual-and-variance-matrix/m-p/5148277#M187727</link>
      <description />
      <pubDate>Fri, 17 Apr 2026 08:43:57 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Budget-actual-and-variance-matrix/m-p/5148277#M187727</guid>
      <dc:creator>helpme123</dc:creator>
      <dc:date>2026-04-17T08:43:57Z</dc:date>
    </item>
    <item>
      <title>Re: Budget, actual and variance matrix</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Budget-actual-and-variance-matrix/m-p/5148326#M187729</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="1579415" data-lia-user-login="helpme123" class="lia-mention lia-mention-user"&gt;helpme123&lt;/a&gt;&amp;nbsp;, Could you please share some sample values for both the actual and budget data? Since the data comes from two different systems, how are you managing the relationships between them? Additionally, could you provide an image of the data model?&lt;BR /&gt;&lt;BR /&gt;thanks&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 14 Apr 2026 12:33:21 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Budget-actual-and-variance-matrix/m-p/5148326#M187729</guid>
      <dc:creator>Natarajan_M</dc:creator>
      <dc:date>2026-04-14T12:33:21Z</dc:date>
    </item>
    <item>
      <title>Re: Budget, actual and variance matrix</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Budget-actual-and-variance-matrix/m-p/5148327#M187730</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="1579415" data-lia-user-login="helpme123" class="lia-mention lia-mention-user"&gt;helpme123&lt;/a&gt;&amp;nbsp;, Your issue might be caused by the way SELECTEDVALUE works, as it breaks for totals and&amp;nbsp;&lt;SPAN&gt;aggregations&lt;!--  ScriptorStartFragment  --&gt; when more than one row is in context&lt;!--  ScriptorEndFragment  --&gt;. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;You can try replacing your measure with:&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;MeasBudget Correct =&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;SUM('Consolidated for Power BI'[Value]).&lt;BR /&gt;&lt;!--  ScriptorEndFragment  --&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I&lt;!--  ScriptorStartFragment  --&gt;f this doesn't work, could you provide more details on how your budget and actual tables are linked&lt;!--  ScriptorEndFragment  --&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 14 Apr 2026 12:39:37 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Budget-actual-and-variance-matrix/m-p/5148327#M187730</guid>
      <dc:creator>A_Veen</dc:creator>
      <dc:date>2026-04-14T12:39:37Z</dc:date>
    </item>
    <item>
      <title>Re: Budget, actual and variance matrix</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Budget-actual-and-variance-matrix/m-p/5148363#M187731</link>
      <description>&lt;P&gt;Thank you for the help it is working now &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 17 Apr 2026 08:44:29 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Budget-actual-and-variance-matrix/m-p/5148363#M187731</guid>
      <dc:creator>helpme123</dc:creator>
      <dc:date>2026-04-17T08:44:29Z</dc:date>
    </item>
    <item>
      <title>Re: Budget, actual and variance matrix</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Budget-actual-and-variance-matrix/m-p/5148375#M187732</link>
      <description>&lt;P&gt;Thank you for the help it is working now &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 17 Apr 2026 08:45:01 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Budget-actual-and-variance-matrix/m-p/5148375#M187732</guid>
      <dc:creator>helpme123</dc:creator>
      <dc:date>2026-04-17T08:45:01Z</dc:date>
    </item>
    <item>
      <title>Re: Budget, actual and variance matrix</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Budget-actual-and-variance-matrix/m-p/5148567#M187737</link>
      <description>&lt;P&gt;The problem is SELECTEDVALUE, it only returns a value when exactly one row exists in filter context, which is why totals return blank and values appear in wrong rows. It is not the right function for a budget measure in a matrix.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Use this instead:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;MeasBudget Correct =
SUM ( 'Consolidated for Power BI'[Value] )
&lt;/LI-CODE&gt;</description>
      <pubDate>Tue, 14 Apr 2026 18:40:33 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Budget-actual-and-variance-matrix/m-p/5148567#M187737</guid>
      <dc:creator>cengizhanarslan</dc:creator>
      <dc:date>2026-04-14T18:40:33Z</dc:date>
    </item>
    <item>
      <title>Re: Budget, actual and variance matrix</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Budget-actual-and-variance-matrix/m-p/5148577#M187738</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;P&gt;We have one ACTUALS table which is from a website called twinfield, and this one seems to work using the SUM formula.&amp;nbsp;&lt;/P&gt;&lt;P&gt;We have a BUDGET spreadsheet with codes on each row that match those on twinfield, and dates aong the top also matching those on twinfield. and these two relationships have been built on power bi.&amp;nbsp;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;Having relationships between two fact tables is not good practice. You should create dimension tables one will be a single list of the codes, one will be a single list of the dates. If you can't build them in Power Query or thru another method, you can simply use VALUES() or ALL() to create a calculated table.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Then the dimension tables handle the relationships, like this (from my own budget reports)&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;Your rows and columns then come from the Dim tables, and your data (sum(amount) from the Fact&amp;nbsp; tables.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hope this helps&lt;/P&gt;&lt;P&gt;David&lt;/P&gt;</description>
      <pubDate>Tue, 14 Apr 2026 19:05:26 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Budget-actual-and-variance-matrix/m-p/5148577#M187738</guid>
      <dc:creator>dedelman_clng</dc:creator>
      <dc:date>2026-04-14T19:05:26Z</dc:date>
    </item>
    <item>
      <title>Re: Budget, actual and variance matrix</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Budget-actual-and-variance-matrix/m-p/5148717#M187739</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="1579415" data-lia-user-login="helpme123" class="lia-mention lia-mention-user"&gt;helpme123&lt;/a&gt;&amp;nbsp;,&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;The issue might be caused due to model design + date alignment, not the aggregation itself.&lt;BR /&gt;The correct approach is to use a proper star schema with Date and Code dimensions, and then rely on a simple aggregation measure.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;1. Create a proper Date table&lt;BR /&gt;Date = ADDCOLUMNS(&lt;BR /&gt;CALENDAR(DATE(2022,1,1), DATE(2026,12,31)),&lt;BR /&gt;"YearMonth", FORMAT([Date], "YYYY/MM"))&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;2. Normalize period columns (Budget &amp;amp; Actuals)&lt;/P&gt;
&lt;P&gt;Convert text periods (e.g., "2026/01") into real dates:&lt;/P&gt;
&lt;P&gt;PeriodDate = DATE(&lt;BR /&gt;LEFT('Consolidated for Power BI'[Attribute],4),&lt;BR /&gt;RIGHT('Consolidated for Power BI'[Attribute],2),&lt;BR /&gt;1)&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;Apply the same logic to the Actuals table.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;3. Create proper relationships&lt;/P&gt;
&lt;P&gt;Use a star schema:&lt;/P&gt;
&lt;P&gt;Code Dimension (1) &amp;gt; Budget (Many)&lt;BR /&gt;Code Dimension (1) &amp;gt; Actuals (Many)&lt;BR /&gt;Date Table (1) &amp;gt; Budget (Many)&lt;BR /&gt;Date Table (1) &amp;gt; Actuals (Many)&lt;/P&gt;
&lt;P&gt;Cross-filter direction: Single (dimension &amp;gt; fact)&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;4. Use a simple measure&lt;BR /&gt;&lt;BR /&gt;Budget = SUM('Consolidated for Power BI'[Value])&lt;BR /&gt;&lt;BR /&gt;Hope this helps.&lt;BR /&gt;Thank you.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 15 Apr 2026 06:12:38 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Budget-actual-and-variance-matrix/m-p/5148717#M187739</guid>
      <dc:creator>v-echaithra</dc:creator>
      <dc:date>2026-04-15T06:12:38Z</dc:date>
    </item>
    <item>
      <title>Re: Budget, actual and variance matrix</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Budget-actual-and-variance-matrix/m-p/5149005#M187746</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="1579415" data-lia-user-login="helpme123" class="lia-mention lia-mention-user"&gt;helpme123&lt;/a&gt;&amp;nbsp;, I mocked up the solution using the sample data you provided .&lt;BR /&gt;&lt;BR /&gt;Is this what you are expecting ?&lt;BR /&gt;&lt;BR /&gt;OP:&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Data model :&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;PBIX :&lt;BR /&gt;&lt;A href="https://1drv.ms/u/c/135210baa2a11a19/IQCERyL_MmAxTao108OaZ2HBAVo4FIpEE5YcQRt80EsafJQ?e=PdL6mS" target="_blank"&gt;Accounting Sample matrix.pbix&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Thanks&amp;nbsp;&lt;BR /&gt;If you found this helpful, please consider giving it a kudo and marking it as the accepted solution — it goes a long way in helping others facing the same issue.&lt;BR /&gt;&lt;BR /&gt;For more Power BI tips and discussions, let’s connect on LinkedIn:&lt;BR /&gt;&lt;A href="https://www.linkedin.com/in/natarajan-manivasagan" target="_blank"&gt;https://www.linkedin.com/in/natarajan-manivasagan&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Cheers!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 15 Apr 2026 14:00:51 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Budget-actual-and-variance-matrix/m-p/5149005#M187746</guid>
      <dc:creator>Natarajan_M</dc:creator>
      <dc:date>2026-04-15T14:00:51Z</dc:date>
    </item>
  </channel>
</rss>

