<?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: Assistance Needed: Complex Matrix Visual Requirements in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Assistance-Needed-Complex-Matrix-Visual-Requirements/m-p/3942207#M153262</link>
    <description>&lt;P&gt;Hi&amp;nbsp;Anonymous&lt;/LI-USER&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;It is wonderful that you have spent time on my query. It was really great, and thank you so much. I have created another post because this is not meeting my requirements.&lt;BR /&gt;However, I will use this one for my future needs. Please reply to my new post&lt;BR /&gt;and let me know if you can open my PBIX file. I have uploaded the latest PBIX file.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Once again, thank you so much!&lt;/P&gt;</description>
    <pubDate>Thu, 23 May 2024 07:43:02 GMT</pubDate>
    <dc:creator>Learner27</dc:creator>
    <dc:date>2024-05-23T07:43:02Z</dc:date>
    <item>
      <title>Assistance Needed: Complex Matrix Visual Requirements</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Assistance-Needed-Complex-Matrix-Visual-Requirements/m-p/3940625#M153212</link>
      <description>&lt;P&gt;Hello Community, I really need your help. and I'm requesting much-needed assistance from you.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;My requirement is to use two Matrix visuals on a single tab. categories and their respective amounts. When I filter my slicers, if I select 2024 April, it should show me the values for April of this year and the prior year (2023) at the same time (Right). In the second visual, I need to display values from January to March, and in the total column, I need to show the year-to-date (YTD) average of those three months. Similarly, for May, if I select May 2024, the left-side visual should show values from January to April, with the YTD being the sum of the four months divided by four.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;I have tried with different measures which doesn't give me proper out put I have Attached my sample Pbix file&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="https://1drv.ms/u/c/31a418f7594bd898/EQY6LrpIU5xPg8rr5rdwdhkBTnrMWsSjckCfdLqC5ZquTA?e=HBr8eV" target="_blank"&gt;DVT File.pbix&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Thanks In advance&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 22 May 2024 18:17:41 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Assistance-Needed-Complex-Matrix-Visual-Requirements/m-p/3940625#M153212</guid>
      <dc:creator>Learner27</dc:creator>
      <dc:date>2024-05-22T18:17:41Z</dc:date>
    </item>
    <item>
      <title>Re: Assistance Needed: Complex Matrix Visual Requirements</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Assistance-Needed-Complex-Matrix-Visual-Requirements/m-p/3942064#M153257</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="583663" data-lia-user-login="Learner27" class="lia-mention lia-mention-user"&gt;Learner27&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Unfortunately,&amp;nbsp;&lt;/SPAN&gt;I cannot open your&amp;nbsp;&lt;SPAN&gt;sample Pbix file. I create a sample data to help you with your problem.&lt;BR /&gt;Sample data:&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;1.Create a Date Table, and make a relationship between two tables. Put the DateTable into the Slicer.&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;2.Add new measures.&lt;/P&gt;
&lt;P&gt;In Matrix 1:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Current Year number =
CALCULATE (
    SUM ( 'Table'[number] ),
    FILTER (
        ALL ( 'Table'[Date] ),
        YEAR ( 'Table'[Date] ) = YEAR ( MAX ( 'Table'[Date] ) )
            &amp;amp;&amp;amp; MONTH ( 'Table'[date] ) = MONTH ( MAX ( 'Table'[date] ) )
    )
)
&lt;/LI-CODE&gt;&lt;LI-CODE lang="markup"&gt;Previous Year number =
CALCULATE (
    SUM ( 'Table'[number] ),
    FILTER (
        ALL ( 'Table'[Date] ),
        YEAR ( 'Table'[Date] )
            = YEAR ( MAX ( 'Table'[Date] ) ) - 1
            &amp;amp;&amp;amp; MONTH ( 'Table'[date] ) = MONTH ( MAX ( 'Table'[date] ) )
    )
)
&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In Matrix 2:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;YTD Average Amount =
VAR _endMonthDay =
    EOMONTH ( SELECTEDVALUE ( DateTable[Y&amp;amp;M] ), -1 )
VAR _monthCurrentSelectMonth =
    MONTH ( SELECTEDVALUE ( DateTable[Y&amp;amp;M] ) )
VAR _startMonthDay =
    EOMONTH ( SELECTEDVALUE ( DateTable[Y&amp;amp;M] ), -1 * _monthCurrentSelectMonth ) + 1
VAR _result =
    CALCULATE (
        SUM ( 'Table'[amount] ),
        'Table'[date] &amp;gt;= _startMonthDay
            &amp;amp;&amp;amp; 'Table'[date] &amp;lt; _endMonthDay
    )
RETURN
    AVERAGEX (
        FILTER (
            ALL ( 'Table' ),
            'Table'[date] &amp;gt;= _startMonthDay
                &amp;amp;&amp;amp; 'Table'[date] &amp;lt; _endMonthDay
        ),
        CALCULATE ( SUM ( 'Table'[Amount] ) )
    )
&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Final output:&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://community.fabric.microsoft.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490" target="_blank" rel="noopener"&gt;How to Get Your Question Answered Quickly - Microsoft Fabric Community&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;If it does not help, please provide more details with your desired out put and pbix file without privacy information.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;/P&gt;
&lt;P&gt;Ada Wang&lt;/P&gt;
&lt;P&gt;If this post&amp;nbsp;&lt;EM&gt;&lt;STRONG&gt;helps&lt;/STRONG&gt;&lt;/EM&gt;, then please consider&lt;EM&gt;&lt;STRONG&gt;&amp;nbsp;Accept it as the solution&amp;nbsp;&lt;/STRONG&gt;&lt;/EM&gt;to help the other members find it more quickly.&lt;/P&gt;</description>
      <pubDate>Thu, 23 May 2024 07:26:00 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Assistance-Needed-Complex-Matrix-Visual-Requirements/m-p/3942064#M153257</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-05-23T07:26:00Z</dc:date>
    </item>
    <item>
      <title>Re: Assistance Needed: Complex Matrix Visual Requirements</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Assistance-Needed-Complex-Matrix-Visual-Requirements/m-p/3942207#M153262</link>
      <description>&lt;P&gt;Hi&amp;nbsp;Anonymous&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;It is wonderful that you have spent time on my query. It was really great, and thank you so much. I have created another post because this is not meeting my requirements.&lt;BR /&gt;However, I will use this one for my future needs. Please reply to my new post&lt;BR /&gt;and let me know if you can open my PBIX file. I have uploaded the latest PBIX file.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Once again, thank you so much!&lt;/P&gt;</description>
      <pubDate>Thu, 23 May 2024 07:43:02 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Assistance-Needed-Complex-Matrix-Visual-Requirements/m-p/3942207#M153262</guid>
      <dc:creator>Learner27</dc:creator>
      <dc:date>2024-05-23T07:43:02Z</dc:date>
    </item>
  </channel>
</rss>

