<?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 Do not filter data from a measure with a slicer in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Do-not-filter-data-from-a-measure-with-a-slicer/m-p/945317#M10281</link>
    <description>&lt;P&gt;Hi,&lt;BR /&gt;&lt;BR /&gt;I'm trying to display over time a graph with both my KPI value and the 6 month rolling average.&lt;BR /&gt;&lt;BR /&gt;I calculated the 6RMA using the following formula :&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;CALCULATE(&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;SUM(CompletedKPIView[KPI Value])/6; &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;DATESINPERIOD((Campaign[MonthDateTime]); MAX(Campaign[MonthDateTime]); -6; MONTH)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;The datas are correct when I display over all the years.&lt;BR /&gt;However, when I filter the data over a specific year, the data calculated in the 6RMA are wrong for the 5 first months. PowerBI doesn't include data from the previous year in the calculus when a slicer is used.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;img /&gt;&lt;/DIV&gt;&lt;DIV&gt;I have tried using an ALL(Campaign) at the end of my calculus. It does work but when I filter in my graph, all the years are displayed, not only the selected one.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;img /&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Thanks for your help&lt;/DIV&gt;&lt;/DIV&gt;</description>
    <pubDate>Mon, 24 Feb 2020 14:51:50 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2020-02-24T14:51:50Z</dc:date>
    <item>
      <title>Do not filter data from a measure with a slicer</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Do-not-filter-data-from-a-measure-with-a-slicer/m-p/945317#M10281</link>
      <description>&lt;P&gt;Hi,&lt;BR /&gt;&lt;BR /&gt;I'm trying to display over time a graph with both my KPI value and the 6 month rolling average.&lt;BR /&gt;&lt;BR /&gt;I calculated the 6RMA using the following formula :&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;CALCULATE(&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;SUM(CompletedKPIView[KPI Value])/6; &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;DATESINPERIOD((Campaign[MonthDateTime]); MAX(Campaign[MonthDateTime]); -6; MONTH)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;The datas are correct when I display over all the years.&lt;BR /&gt;However, when I filter the data over a specific year, the data calculated in the 6RMA are wrong for the 5 first months. PowerBI doesn't include data from the previous year in the calculus when a slicer is used.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;img /&gt;&lt;/DIV&gt;&lt;DIV&gt;I have tried using an ALL(Campaign) at the end of my calculus. It does work but when I filter in my graph, all the years are displayed, not only the selected one.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;img /&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Thanks for your help&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Mon, 24 Feb 2020 14:51:50 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Do-not-filter-data-from-a-measure-with-a-slicer/m-p/945317#M10281</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-02-24T14:51:50Z</dc:date>
    </item>
    <item>
      <title>Re: Do not filter data from a measure with a slicer</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Do-not-filter-data-from-a-measure-with-a-slicer/m-p/945331#M10282</link>
      <description>DATESINPERIOD will work correctly only on DATE TABLES. I presume that Campaign is not a date table. Please create a proper date table in your model, mark it as such and connect to your fact tables. Then and only then will you get correct answers from time-intel functions.&lt;BR /&gt;&lt;BR /&gt;Best&lt;BR /&gt;D</description>
      <pubDate>Mon, 24 Feb 2020 14:59:27 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Do-not-filter-data-from-a-measure-with-a-slicer/m-p/945331#M10282</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-02-24T14:59:27Z</dc:date>
    </item>
    <item>
      <title>Re: Do not filter data from a measure with a slicer</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Do-not-filter-data-from-a-measure-with-a-slicer/m-p/945357#M10289</link>
      <description>&lt;P&gt;This is a Date Tables linked to the fact table.&lt;BR /&gt;The datas are correct, but not when a slicer is used. Data calculated between January and May are wrong as the months from the previous year are not all taken into account.&lt;/P&gt;</description>
      <pubDate>Mon, 24 Feb 2020 15:12:39 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Do-not-filter-data-from-a-measure-with-a-slicer/m-p/945357#M10289</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-02-24T15:12:39Z</dc:date>
    </item>
    <item>
      <title>Re: Do not filter data from a measure with a slicer</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Do-not-filter-data-from-a-measure-with-a-slicer/m-p/945754#M10341</link>
      <description>&lt;P&gt;So, you're saying that Campaign is a proper Date table marked as such in the model? If it were, then DATESINPERIOD would overwrite any filters on the table and you'd get a correct result. But this does not happen. What happens is that Power BI makes an intersection of the year selected with the 6M period you're trying to calculate the measure over. Hence I know that you don't have a proper Date table. I've been in this business for much too long not to be able to recognize at first sight that a date table is not in there...&lt;BR /&gt;&lt;BR /&gt;Easy &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;BR /&gt;&lt;BR /&gt;Best&lt;BR /&gt;D&lt;/P&gt;</description>
      <pubDate>Mon, 24 Feb 2020 18:31:43 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Do-not-filter-data-from-a-measure-with-a-slicer/m-p/945754#M10341</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-02-24T18:31:43Z</dc:date>
    </item>
    <item>
      <title>Re: Do not filter data from a measure with a slicer</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Do-not-filter-data-from-a-measure-with-a-slicer/m-p/945768#M10343</link>
      <description>&lt;P&gt;Anonymous&lt;/LI-USER&gt;, please do yourself a favor and watch this: &lt;A href="https://www.sqlbi.com/tv/time-intelligence-in-microsoft-power-bi/" target="_blank" rel="noopener"&gt;https://www.sqlbi.com/tv/time-intelligence-in-microsoft-power-bi/&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Many thanks.&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;Best&lt;BR /&gt;D&lt;/P&gt;</description>
      <pubDate>Mon, 24 Feb 2020 18:29:57 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Do-not-filter-data-from-a-measure-with-a-slicer/m-p/945768#M10343</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-02-24T18:29:57Z</dc:date>
    </item>
    <item>
      <title>Re: Do not filter data from a measure with a slicer</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Do-not-filter-data-from-a-measure-with-a-slicer/m-p/947171#M10427</link>
      <description>&lt;P&gt;I understood what you meant by proper date table. I managed to solve my problem. Thanks !&lt;/P&gt;</description>
      <pubDate>Tue, 25 Feb 2020 13:33:42 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Do-not-filter-data-from-a-measure-with-a-slicer/m-p/947171#M10427</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-02-25T13:33:42Z</dc:date>
    </item>
    <item>
      <title>Re: Do not filter data from a measure with a slicer</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Do-not-filter-data-from-a-measure-with-a-slicer/m-p/947279#M10433</link>
      <description>OK. Good.&lt;BR /&gt;&lt;BR /&gt;Best&lt;BR /&gt;D</description>
      <pubDate>Tue, 25 Feb 2020 15:04:02 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Do-not-filter-data-from-a-measure-with-a-slicer/m-p/947279#M10433</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-02-25T15:04:02Z</dc:date>
    </item>
  </channel>
</rss>

