<?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 How to compare current selected month and the month before's data in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-compare-current-selected-month-and-the-month-before-s/m-p/3042274#M104411</link>
    <description>&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a dataset which records the value of three KPIs each month.&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;I currently have a multirow card which displays these KPIs, connected to a slicer so that I can see each month's totals. For example, for January 2023:&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I would like to display next to this card the difference between the selected month's values and month prior to it. For example, if January 2023 were selected, I'd like it to show +5 for number of activity cards (because 0 were produced in Dec 2022), +2 articles and +3 Lunch and Learns.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How is the best way to do this? I am a complete Power BI novice, so I'm not sure where to start!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;H&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 25 Jan 2023 10:19:32 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2023-01-25T10:19:32Z</dc:date>
    <item>
      <title>How to compare current selected month and the month before's data</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-compare-current-selected-month-and-the-month-before-s/m-p/3042274#M104411</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a dataset which records the value of three KPIs each month.&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;I currently have a multirow card which displays these KPIs, connected to a slicer so that I can see each month's totals. For example, for January 2023:&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I would like to display next to this card the difference between the selected month's values and month prior to it. For example, if January 2023 were selected, I'd like it to show +5 for number of activity cards (because 0 were produced in Dec 2022), +2 articles and +3 Lunch and Learns.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How is the best way to do this? I am a complete Power BI novice, so I'm not sure where to start!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;H&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 25 Jan 2023 10:19:32 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-compare-current-selected-month-and-the-month-before-s/m-p/3042274#M104411</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-01-25T10:19:32Z</dc:date>
    </item>
    <item>
      <title>Re: How to compare current selected month and the month before's data</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-compare-current-selected-month-and-the-month-before-s/m-p/3042447#M104419</link>
      <description>&lt;P&gt;hi Anonymous&lt;/LI-USER&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;you would need several measures like:&lt;/P&gt;&lt;DIV&gt;number of article PM =&lt;/DIV&gt;&lt;DIV&gt;CALCULATE(&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp;SUM(TableName[KPI&amp;nbsp;Value]),&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp;TableName[KPI name] = "Number of articles",&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp;TableName([Date]) = EDATE(MAX(TableName([Date])), -1)&lt;/DIV&gt;&lt;DIV&gt;)&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;number of activity card PM =&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;CALCULATE(&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;SUM(TableName[KPI Value]),&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;TableName[KPI name] = "Number of activity card",&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;TableName([Date]) = EDATE(MAX(TableName([Date])), -1)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;number of launch and learns PM =&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;CALCULATE(&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;SUM(TableName[KPI Value]),&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;TableName[KPI name] = "Number of Launch and Learns",&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;TableName([Date]) = EDATE(MAX(TableName([Date])), -1)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;number of article MoM =&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;[&lt;/SPAN&gt;&lt;SPAN&gt;number of article&lt;/SPAN&gt;&lt;SPAN&gt;] - [&lt;/SPAN&gt;&lt;SPAN&gt;number of article PM&lt;/SPAN&gt;&lt;SPAN&gt;]&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;number of activity card&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;MoM =&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;[&lt;/SPAN&gt;&lt;SPAN&gt;number of activity card&lt;/SPAN&gt;&lt;SPAN&gt;] - [&lt;/SPAN&gt;&lt;SPAN&gt;number of activity card&lt;/SPAN&gt;&lt;SPAN&gt; PM]&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;number of launch and learns&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;MoM =&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;[&lt;/SPAN&gt;&lt;SPAN&gt;number of launch and learns&lt;/SPAN&gt;&lt;SPAN&gt;] - [&lt;/SPAN&gt;&lt;SPAN&gt;number of launch and learns&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;PM&lt;/SPAN&gt;&lt;SPAN&gt;]&lt;/SPAN&gt;&lt;/DIV&gt;</description>
      <pubDate>Wed, 25 Jan 2023 11:29:17 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-compare-current-selected-month-and-the-month-before-s/m-p/3042447#M104419</guid>
      <dc:creator>FreemanZ</dc:creator>
      <dc:date>2023-01-25T11:29:17Z</dc:date>
    </item>
    <item>
      <title>Re: How to compare current selected month and the month before's data</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-compare-current-selected-month-and-the-month-before-s/m-p/3042501#M104427</link>
      <description>&lt;P&gt;I'm sorry &lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="460868" data-lia-user-login="FreemanZ" class="lia-mention lia-mention-user"&gt;FreemanZ&lt;/a&gt;, I don't really understand. If we zoom in on the KPI for "Number of articles", could you explain what the expected output of each of those measures would be?&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;I tried doing the first measure, but it just returns (blank) when put it into a card unless I have multiple dates selected. Even then, I don't really understand what the number returned refers to. For example, if I selected Februay and March 2023, "1" is returned.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Ideally, if I had just March highlighted, I'd want to return February's number (so I can then calculate the difference between the two).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks so much,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;H&lt;/P&gt;</description>
      <pubDate>Wed, 25 Jan 2023 12:13:05 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-compare-current-selected-month-and-the-month-before-s/m-p/3042501#M104427</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-01-25T12:13:05Z</dc:date>
    </item>
    <item>
      <title>Re: How to compare current selected month and the month before's data</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-compare-current-selected-month-and-the-month-before-s/m-p/3054060#M105292</link>
      <description>&lt;P&gt;hi&amp;nbsp;Anonymous&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;could you paste your dataset again as editable text and lemme verify the code?&lt;/P&gt;</description>
      <pubDate>Wed, 01 Feb 2023 01:59:27 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-compare-current-selected-month-and-the-month-before-s/m-p/3054060#M105292</guid>
      <dc:creator>FreemanZ</dc:creator>
      <dc:date>2023-02-01T01:59:27Z</dc:date>
    </item>
  </channel>
</rss>

