<?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: Same month, last year with a slicer on page in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Same-month-last-year-with-a-slicer-on-page/m-p/3865043#M150986</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="100342" data-lia-user-login="lbendlin" class="lia-mention lia-mention-user"&gt;lbendlin&lt;/a&gt;&amp;nbsp;,thanks for the quick reply, I'll add further.&lt;/P&gt;
&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="730465" data-lia-user-login="itscaptainmatt" class="lia-mention lia-mention-user"&gt;itscaptainmatt&lt;/a&gt;&amp;nbsp;，&lt;/P&gt;
&lt;P&gt;The Table data is shown below:&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;Please follow these steps:&lt;BR /&gt;1.&amp;nbsp;Use the following DAX expression to create a measure&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Last Year = 
VAR _a = SELECTEDVALUE('Table'[Year]) -1 
VAR _b = SELECTEDVALUE('Table'[Month])
VAR _c = CALCULATE(SUM('Table'[Sales]),'Table'[Year] = _a,'Table'[Month] = _b)
RETURN _c&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;2.Final output&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 24 Apr 2024 10:07:02 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2024-04-24T10:07:02Z</dc:date>
    <item>
      <title>Same month, last year with a slicer on page</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Same-month-last-year-with-a-slicer-on-page/m-p/3862728#M150903</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've tried many ways of doing this with sameperiodlast year and the dateadd functions but I can't seem to eliminate the effect of my slicer. I have a slicer that allows me to choose which month and year.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am able to to total my sales in column 1, pull my sales target in column 2 and have my pace % for current month in column 3. I would like to add my sales of the same month but year selected -1. For column 5 I would like to have Column 1 divided by column 4 (should be ok once I figure out column 4. Example of what I would like:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;Category&lt;/TD&gt;&lt;TD&gt;Sales&lt;/TD&gt;&lt;TD&gt;Target&lt;/TD&gt;&lt;TD&gt;Pace %&lt;/TD&gt;&lt;TD&gt;Sales Last Year&lt;/TD&gt;&lt;TD&gt;Last Year %&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My slicer affects my entire visual and I can't seem to figure out how to have it not affect this particular measure. My Sales Last Year Column ends up showing the same data as my Sales column.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Could I please have some help with this?&lt;/P&gt;</description>
      <pubDate>Tue, 23 Apr 2024 14:40:13 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Same-month-last-year-with-a-slicer-on-page/m-p/3862728#M150903</guid>
      <dc:creator>itscaptainmatt</dc:creator>
      <dc:date>2024-04-23T14:40:13Z</dc:date>
    </item>
    <item>
      <title>Re: Same month, last year with a slicer on page</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Same-month-last-year-with-a-slicer-on-page/m-p/3863695#M150939</link>
      <description>&lt;P&gt;Use disconnected tables to feed your slicers.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please provide sample data that covers your issue or question &lt;STRONG&gt;completely&lt;/STRONG&gt;, in a &lt;STRONG&gt;usable&lt;/STRONG&gt; format (not as a screenshot).&lt;BR /&gt;&lt;BR /&gt;Do not include sensitive information or anything not related to the issue or question. &lt;BR /&gt;&lt;BR /&gt;If you are unsure how to upload data please refer to &lt;A href="https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-Forum/ba-p/963216" target="_blank"&gt;https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-Forum/ba-p/963216&lt;/A&gt; &lt;BR /&gt;&lt;BR /&gt;Please show the expected outcome based on the sample data you provided. &lt;BR /&gt;&lt;BR /&gt;Want faster answers? &lt;A href="https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447523" target="_blank"&gt;https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447523&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 24 Apr 2024 00:25:13 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Same-month-last-year-with-a-slicer-on-page/m-p/3863695#M150939</guid>
      <dc:creator>lbendlin</dc:creator>
      <dc:date>2024-04-24T00:25:13Z</dc:date>
    </item>
    <item>
      <title>Re: Same month, last year with a slicer on page</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Same-month-last-year-with-a-slicer-on-page/m-p/3865043#M150986</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="100342" data-lia-user-login="lbendlin" class="lia-mention lia-mention-user"&gt;lbendlin&lt;/a&gt;&amp;nbsp;,thanks for the quick reply, I'll add further.&lt;/P&gt;
&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="730465" data-lia-user-login="itscaptainmatt" class="lia-mention lia-mention-user"&gt;itscaptainmatt&lt;/a&gt;&amp;nbsp;，&lt;/P&gt;
&lt;P&gt;The Table data is shown below:&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;Please follow these steps:&lt;BR /&gt;1.&amp;nbsp;Use the following DAX expression to create a measure&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Last Year = 
VAR _a = SELECTEDVALUE('Table'[Year]) -1 
VAR _b = SELECTEDVALUE('Table'[Month])
VAR _c = CALCULATE(SUM('Table'[Sales]),'Table'[Year] = _a,'Table'[Month] = _b)
RETURN _c&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;2.Final output&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 24 Apr 2024 10:07:02 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Same-month-last-year-with-a-slicer-on-page/m-p/3865043#M150986</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-04-24T10:07:02Z</dc:date>
    </item>
  </channel>
</rss>

