<?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 SAMEPERIODLASTYEAR based on text column in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/SAMEPERIODLASTYEAR-based-on-text-column/m-p/3206922#M116826</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I would like to compute&amp;nbsp;SAMEPERIODLASTYEAR()&amp;nbsp;to understand YoY growth of my revenue numbers. However, my data model doesn't have a date column but it has a fiscal_quarter column which is of "Text" data type.&amp;nbsp;Since&amp;nbsp;SAMEPERIODLASTYEAR() requires a date column as an input how do I go about it?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried adding a column in my data "quarter_start_date" (a date data type) which corresponds to each fiscal_quarter value and compute SAMEPERIODLASTYEAR() based on quarter_start_date, but when i use fiscal_quarter column in the slicer to fiter our the quarter it doen't give me the last year data. Please let me know. Thanks.&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;</description>
    <pubDate>Wed, 26 Apr 2023 09:54:10 GMT</pubDate>
    <dc:creator>kev_sav</dc:creator>
    <dc:date>2023-04-26T09:54:10Z</dc:date>
    <item>
      <title>SAMEPERIODLASTYEAR based on text column</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/SAMEPERIODLASTYEAR-based-on-text-column/m-p/3206922#M116826</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I would like to compute&amp;nbsp;SAMEPERIODLASTYEAR()&amp;nbsp;to understand YoY growth of my revenue numbers. However, my data model doesn't have a date column but it has a fiscal_quarter column which is of "Text" data type.&amp;nbsp;Since&amp;nbsp;SAMEPERIODLASTYEAR() requires a date column as an input how do I go about it?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried adding a column in my data "quarter_start_date" (a date data type) which corresponds to each fiscal_quarter value and compute SAMEPERIODLASTYEAR() based on quarter_start_date, but when i use fiscal_quarter column in the slicer to fiter our the quarter it doen't give me the last year data. Please let me know. Thanks.&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;</description>
      <pubDate>Wed, 26 Apr 2023 09:54:10 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/SAMEPERIODLASTYEAR-based-on-text-column/m-p/3206922#M116826</guid>
      <dc:creator>kev_sav</dc:creator>
      <dc:date>2023-04-26T09:54:10Z</dc:date>
    </item>
    <item>
      <title>Re: SAMEPERIODLASTYEAR based on text column</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/SAMEPERIODLASTYEAR-based-on-text-column/m-p/3208616#M116948</link>
      <description>&lt;P&gt;hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="551647" data-lia-user-login="kev_sav" class="lia-mention lia-mention-user"&gt;kev_sav&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;not sure if i fully get you, please try plot a visual with a measure like:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Measure = 
VAR MaxDate = 
    MAX(data[fiscal_quarter_date])
RETURN
    CALCULATE(
        SUM(data[revenue]),
        data[fiscal_quarter_date]=EDATE(MaxDate, -12),
        ALL(data)
    )&lt;/LI-CODE&gt;&lt;P&gt;tried to verify with expanded data like:&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;it worked like:&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 27 Apr 2023 06:52:29 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/SAMEPERIODLASTYEAR-based-on-text-column/m-p/3208616#M116948</guid>
      <dc:creator>FreemanZ</dc:creator>
      <dc:date>2023-04-27T06:52:29Z</dc:date>
    </item>
    <item>
      <title>Re: SAMEPERIODLASTYEAR based on text column</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/SAMEPERIODLASTYEAR-based-on-text-column/m-p/3209719#M117040</link>
      <description>&lt;P&gt;Thanks a lot. This solution worked!&lt;/P&gt;</description>
      <pubDate>Thu, 27 Apr 2023 15:48:11 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/SAMEPERIODLASTYEAR-based-on-text-column/m-p/3209719#M117040</guid>
      <dc:creator>kev_sav</dc:creator>
      <dc:date>2023-04-27T15:48:11Z</dc:date>
    </item>
  </channel>
</rss>

