<?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: Display the selected period in the slice for all years in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Display-the-selected-period-in-the-slice-for-all-years/m-p/1632418#M33075</link>
    <description>&lt;P&gt;Anonymous&lt;/LI-USER&gt;&amp;nbsp;- I'm marking this as solved. I hope it helped. If not, please reply back and let us know.&lt;/P&gt;</description>
    <pubDate>Fri, 29 Jan 2021 17:49:45 GMT</pubDate>
    <dc:creator>edhans</dc:creator>
    <dc:date>2021-01-29T17:49:45Z</dc:date>
    <item>
      <title>Display the selected period in the slice for all years</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Display-the-selected-period-in-the-slice-for-all-years/m-p/1439256#M26915</link>
      <description>&lt;P&gt;Hi community,&lt;/P&gt;&lt;P&gt;I'm having the following case:&lt;/P&gt;&lt;P&gt;For example, in a date Slicer, I select the period 10/01/2019 - 12/01/2019 . Then, I need to display a bar chart with same&lt;BR /&gt;period selected for all years of my dataset.&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Example:&lt;BR /&gt;I have this data set:&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;TABLE border="0" cellspacing="0" cellpadding="0"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;Year&lt;/TD&gt;&lt;TD&gt;Month&lt;/TD&gt;&lt;TD&gt;Total&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;2018&lt;/TD&gt;&lt;TD&gt;jan&lt;/TD&gt;&lt;TD&gt;50&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;2018&lt;/TD&gt;&lt;TD&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STRONG&gt;&lt;/TD&gt;&lt;TD&gt;&lt;STRONG&gt;10&lt;/STRONG&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;STRONG&gt;2019&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD&gt;&lt;STRONG&gt;nov&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD&gt;&lt;STRONG&gt;10&lt;/STRONG&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;STRONG&gt;2019&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD&gt;&lt;STRONG&gt;dez&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD&gt;&lt;STRONG&gt;20&lt;/STRONG&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;SPAN&gt;&lt;BR /&gt;&lt;/SPAN&gt;I need that my result be like the image below:&lt;BR /&gt;&lt;img /&gt;&lt;BR /&gt;The Slicer need be a slider format.&lt;/P&gt;</description>
      <pubDate>Fri, 16 Oct 2020 19:06:31 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Display-the-selected-period-in-the-slice-for-all-years/m-p/1439256#M26915</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-10-16T19:06:31Z</dc:date>
    </item>
    <item>
      <title>Re: Display the selected period in the slice for all years</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Display-the-selected-period-in-the-slice-for-all-years/m-p/1439527#M26921</link>
      <description>&lt;P&gt;Anonymous&lt;/LI-USER&gt; , With a date table, You can use Trailing year measure &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Year behind Sales = CALCULATE(SUM(Sales[Sales Amount]),dateadd('Date'[Date],-1,Year))&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;or you can use SAMEPERIODLASTYEAR&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Year behind Sales = CALCULATE(SUM(Sales[Sales Amount]),SAMEPERIODLASTYEAR('Date'[Date]))&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT size="2"&gt;To get the best of the time intelligence function. Make sure you have a date calendar and it has been marked as the date in model view. Also, join it with the date column of your fact/s. Refer :&lt;A href="https://radacad.com/creating-calendar-table-in-power-bi-using-dax-functions" target="_blank"&gt;radacad&lt;/A&gt; &lt;A href="https://www.sqlbi.com/articles/creating-a-simple-date-table-in-dax/" target="_blank"&gt;sqlbi&lt;/A&gt; &lt;A href="https://www.youtube.com/playlist?list=PLPaNVDMhUXGYLz-w8ERQOo3KYARs7GgG-" target="_blank"&gt;My Video Series&lt;/A&gt; Appreciate your Kudos. &lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT size="2"&gt;&lt;FONT size="1"&gt; Please provide your feedback comments and advice for new videos &lt;BR /&gt;&lt;A href="https://www.youtube.com/watch?v=wvsAzTqSDVg&amp;amp;list=PLPaNVDMhUXGaaqV92SBD5X2hk3TMNlHhb" target="_blank"&gt;Tutorial Series&lt;/A&gt; &lt;A href="https://www.youtube.com/watch?v=WlvQ_SGy4iA&amp;amp;list=PLPaNVDMhUXGZNyKU0PgG2g3P0c6CPjMnj" target="_blank"&gt;Dax Vs SQL&lt;/A&gt; &lt;A href="https://www.youtube.com/watch?v=My0bLn9voo4&amp;amp;list=PLPaNVDMhUXGbKatyDdOhGbTL3xW2Xy6pA" target="_blank"&gt;Direct Query&lt;/A&gt; &lt;A href="https://www.youtube.com/watch?v=YWo-ZpKM6gU&amp;amp;list=PLPaNVDMhUXGYrm5rm6ME6rjzKGSvT9Jmy" target="_blank"&gt;PBI Tips&lt;/A&gt; &lt;BR /&gt;Appreciate your Kudos.&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 17 Oct 2020 01:34:17 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Display-the-selected-period-in-the-slice-for-all-years/m-p/1439527#M26921</guid>
      <dc:creator>amitchandak</dc:creator>
      <dc:date>2020-10-17T01:34:17Z</dc:date>
    </item>
    <item>
      <title>Re: Display the selected period in the slice for all years</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Display-the-selected-period-in-the-slice-for-all-years/m-p/1447773#M27164</link>
      <description>&lt;P&gt;Hi&amp;nbsp;Anonymous&lt;/LI-USER&gt;&amp;nbsp;- believe it or not, you&amp;nbsp;&lt;EM&gt;do not need any measures for this.&lt;/EM&gt; You can use an Implict Measure by just dragging in the field, but it does require some creative modeling, and it has one assumption, below:&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;Create your date table manually. &lt;A href="https://bit.ly/DateTableByEd" target="_self"&gt;I recommend using this date table&lt;/A&gt;, because it is awesome. &lt;span class="lia-unicode-emoji" title=":face_with_tears_of_joy:"&gt;😂&lt;/span&gt;&lt;span class="lia-unicode-emoji" title=":thumbs_up:"&gt;👍&lt;/span&gt; There are instructions on how to copy and paste that in to Power Query so it works.&lt;/LI&gt;
&lt;LI&gt;Change the Source row to be whatever dates you want. It starts with Jan 1, 2015 through Dec 31, 2020. I changed it in the attached PBIX to Jan 1, 2018 through Dec 31, 2019 to correspond with your data.&lt;/LI&gt;
&lt;LI&gt;Add a new column to that Date Table called "Month Day" by adding a custom column in Power Query. It needs to be this formula:
&lt;OL&gt;
&lt;LI&gt;&lt;STRONG&gt;&lt;FONT face="courier new,courier"&gt;#date(List.Max(#"Added MonthDay"[Year]), [Month], [Day])&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/LI&gt;
&lt;LI&gt;Set the data type as a date&lt;/LI&gt;
&lt;LI&gt;This is the assumption - your date slicer will always be for the current year's dates, but will show all related years.&lt;/LI&gt;
&lt;/OL&gt;
&lt;/LI&gt;
&lt;LI&gt;Close and load&lt;/LI&gt;
&lt;LI&gt;Mark this date table as a date table.&lt;/LI&gt;
&lt;LI&gt;Add your date slicer, and use this new Month Date field. It should show Jan 1, 2019 through Dec 31, 2019. (I changed the source line of the date table to be 2018 and 2019 per your supplied data.&lt;/LI&gt;
&lt;LI&gt;Create a bar chart.
&lt;OL&gt;
&lt;LI&gt;Add a simple measure of SUM(Table[Total]) or just drag the total to it.&lt;/LI&gt;
&lt;LI&gt;Add the Year field from the date table to the Axis&lt;/LI&gt;
&lt;/OL&gt;
&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://1drv.ms/u/s!AheFG2CwN3xnioppK_ZPnqA3zAAGUg?e=56y8dq" target="_self"&gt;Here is a link to my PBIX file&lt;/A&gt; that you can look at. It is easier when you can see the tables, the model, and the source Power Query data.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 21 Oct 2020 19:26:14 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Display-the-selected-period-in-the-slice-for-all-years/m-p/1447773#M27164</guid>
      <dc:creator>edhans</dc:creator>
      <dc:date>2020-10-21T19:26:14Z</dc:date>
    </item>
    <item>
      <title>Re: Display the selected period in the slice for all years</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Display-the-selected-period-in-the-slice-for-all-years/m-p/1452864#M27301</link>
      <description>&lt;P&gt;Anonymous&lt;/LI-USER&gt;&amp;nbsp;- have you had a chance to review either of these solutions? If you always have just 2 years of data,&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="148838" data-lia-user-login="amitchandak" class="lia-mention lia-mention-user"&gt;amitchandak&lt;/a&gt;'s time intelligence is a bit easier to understand and will work.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you have multiple years, my model change will compensate for that but needs a little more setup to work.&lt;/P&gt;</description>
      <pubDate>Fri, 23 Oct 2020 20:43:25 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Display-the-selected-period-in-the-slice-for-all-years/m-p/1452864#M27301</guid>
      <dc:creator>edhans</dc:creator>
      <dc:date>2020-10-23T20:43:25Z</dc:date>
    </item>
    <item>
      <title>Re: Display the selected period in the slice for all years</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Display-the-selected-period-in-the-slice-for-all-years/m-p/1632418#M33075</link>
      <description>&lt;P&gt;Anonymous&lt;/a&gt;&amp;nbsp;- I'm marking this as solved. I hope it helped. If not, please reply back and let us know.&lt;/P&gt;</description>
      <pubDate>Fri, 29 Jan 2021 17:49:45 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Display-the-selected-period-in-the-slice-for-all-years/m-p/1632418#M33075</guid>
      <dc:creator>edhans</dc:creator>
      <dc:date>2021-01-29T17:49:45Z</dc:date>
    </item>
  </channel>
</rss>

