<?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 Compare the count of values from last year month to current year month for all month in Matrix in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Compare-the-count-of-values-from-last-year-month-to-current-year/m-p/2611266#M75750</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;new to powe bi, i need to compare last year month count to presene year count, if value increase need to show arrow mark should be up, if decrease arrow should be down in conditional formate&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;when i use date date add, parallell period, privious month it will compare with in the year of month it won't give result last year month screen shot below&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;pls help me sort out this issue&lt;/P&gt;</description>
    <pubDate>Thu, 30 Jun 2022 07:27:26 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2022-06-30T07:27:26Z</dc:date>
    <item>
      <title>Compare the count of values from last year month to current year month for all month in Matrix</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Compare-the-count-of-values-from-last-year-month-to-current-year/m-p/2611266#M75750</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;new to powe bi, i need to compare last year month count to presene year count, if value increase need to show arrow mark should be up, if decrease arrow should be down in conditional formate&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;when i use date date add, parallell period, privious month it will compare with in the year of month it won't give result last year month screen shot below&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;pls help me sort out this issue&lt;/P&gt;</description>
      <pubDate>Thu, 30 Jun 2022 07:27:26 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Compare-the-count-of-values-from-last-year-month-to-current-year/m-p/2611266#M75750</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-06-30T07:27:26Z</dc:date>
    </item>
    <item>
      <title>Re: Compare the count of values from last year month to current year month for all month in Matrix</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Compare-the-count-of-values-from-last-year-month-to-current-year/m-p/2611522#M75763</link>
      <description>&lt;P&gt;Hi&amp;nbsp;Anonymous&lt;/LI-USER&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;try with two slicers, one for the year and one for the month and avoid using hierarchy slicer&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 30 Jun 2022 08:48:04 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Compare-the-count-of-values-from-last-year-month-to-current-year/m-p/2611522#M75763</guid>
      <dc:creator>tamerj1</dc:creator>
      <dc:date>2022-06-30T08:48:04Z</dc:date>
    </item>
    <item>
      <title>Re: Compare the count of values from last year month to current year month for all month in Matrix</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Compare-the-count-of-values-from-last-year-month-to-current-year/m-p/2621767#M76394</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;Use a single slicer and create two measures like below:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;current_year_month =
CALCULATE (
    COUNT ( 'table'[value] ),
    FILTER (
        ALLSELECTED ( 'table' ),
        'table'[plant] = SELECTEDVALUE ( 'table'[plant] )
            &amp;amp;&amp;amp; YEAR ( 'table'[date] ) = YEAR ( SELECTEDVALUE ( 'table'[date] ) )
            &amp;amp;&amp;amp; MONTH ( 'table'[date] ) = MONTH ( SELECTEDVALUE ( 'table'[date] ) )
    )
)

Last_year_month =
CALCULATE (
    COUNT ( 'table'[value] ),
    FILTER (
        ALLSELECTED ( 'table' ),
        'table'[plant] = SELECTEDVALUE ( 'table'[plant] )
            &amp;amp;&amp;amp; YEAR ( 'table'[date] )
                = YEAR ( SELECTEDVALUE ( 'table'[date] ) ) - 1
            &amp;amp;&amp;amp; MONTH ( 'table'[date] ) = MONTH ( SELECTEDVALUE ( 'table'[date] ) )
    )
)
&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;/P&gt;
&lt;P&gt;Jay&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 06 Jul 2022 08:27:27 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Compare-the-count-of-values-from-last-year-month-to-current-year/m-p/2621767#M76394</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-07-06T08:27:27Z</dc:date>
    </item>
  </channel>
</rss>

