<?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 Get Previous year from selected year in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Get-Previous-year-from-selected-year/m-p/2151061#M49574</link>
    <description>&lt;P&gt;Hello,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Need help please !&amp;nbsp;&lt;/P&gt;&lt;P&gt;I need to get value of previous year depend year select with a slicer.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When I select 2021 I want to see value for 2020. how can I do that ?&lt;/P&gt;&lt;P&gt;I try to use SELECTEDVALUE : CALCULATE(sum(value), YEAR(date)=SELECTEDVALUE(Col1)-1)...&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank You&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;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 22 Oct 2021 19:37:56 GMT</pubDate>
    <dc:creator>freginier</dc:creator>
    <dc:date>2021-10-22T19:37:56Z</dc:date>
    <item>
      <title>Get Previous year from selected year</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Get-Previous-year-from-selected-year/m-p/2151061#M49574</link>
      <description>&lt;P&gt;Hello,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Need help please !&amp;nbsp;&lt;/P&gt;&lt;P&gt;I need to get value of previous year depend year select with a slicer.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When I select 2021 I want to see value for 2020. how can I do that ?&lt;/P&gt;&lt;P&gt;I try to use SELECTEDVALUE : CALCULATE(sum(value), YEAR(date)=SELECTEDVALUE(Col1)-1)...&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank You&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;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 22 Oct 2021 19:37:56 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Get-Previous-year-from-selected-year/m-p/2151061#M49574</guid>
      <dc:creator>freginier</dc:creator>
      <dc:date>2021-10-22T19:37:56Z</dc:date>
    </item>
    <item>
      <title>Re: Get Previous year from selected year</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Get-Previous-year-from-selected-year/m-p/2151187#M49579</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="334349" data-lia-user-login="freginier" class="lia-mention lia-mention-user"&gt;freginier&lt;/a&gt;&amp;nbsp;Try:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;CALCULATE(sum(value), ALL('Table'), YEAR(date)=SELECTEDVALUE(Col1)-1)&lt;/LI-CODE&gt;</description>
      <pubDate>Fri, 22 Oct 2021 23:13:00 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Get-Previous-year-from-selected-year/m-p/2151187#M49579</guid>
      <dc:creator>Greg_Deckler</dc:creator>
      <dc:date>2021-10-22T23:13:00Z</dc:date>
    </item>
    <item>
      <title>Re: Get Previous year from selected year</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Get-Previous-year-from-selected-year/m-p/2151289#M49582</link>
      <description>&lt;P&gt;Thank you ! that work with a Date not connected (I create a Date Table not connected).&lt;/P&gt;&lt;P&gt;Any solution with a connected Date ?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 23 Oct 2021 07:30:19 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Get-Previous-year-from-selected-year/m-p/2151289#M49582</guid>
      <dc:creator>freginier</dc:creator>
      <dc:date>2021-10-23T07:30:19Z</dc:date>
    </item>
    <item>
      <title>Re: Get Previous year from selected year</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Get-Previous-year-from-selected-year/m-p/2165903#M50175</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="334349" data-lia-user-login="freginier" class="lia-mention lia-mention-user"&gt;freginier&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;As far as I’m concerned, you can just use one single table without a calendar table connected to achieve your requirement, you can create a measure like this:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Sum = CALCULATE(SUM('Table'[Amount]),FILTER(ALL('Table'),[Year]=SELECTEDVALUE('Table'[Year])-1))&lt;/LI-CODE&gt;
&lt;P&gt;Then you can create a card chart to place the measure like this:&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;And you can get what you want.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you very much!&lt;/P&gt;
&lt;P&gt;&lt;U&gt;&amp;nbsp;&lt;/U&gt;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;/P&gt;
&lt;P&gt;Community Support Team _Robert Qin&lt;/P&gt;
&lt;P&gt;If this post &lt;STRONG&gt;helps&lt;/STRONG&gt;, then please consider &lt;STRONG&gt;&lt;EM&gt;Accept it as the solution&lt;/EM&gt;&lt;/STRONG&gt; to help the other members find it more quickly.&lt;/P&gt;</description>
      <pubDate>Mon, 01 Nov 2021 09:42:58 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Get-Previous-year-from-selected-year/m-p/2165903#M50175</guid>
      <dc:creator>v-robertq-msft</dc:creator>
      <dc:date>2021-11-01T09:42:58Z</dc:date>
    </item>
  </channel>
</rss>

