<?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: Sales Comparison with LY and CY in Cloud in Alteryx Designer Cloud Discussions</title>
    <link>https://community.alteryx.com/t5/Alteryx-Designer-Cloud-Discussions/Sales-Comparison-with-LY-and-CY-in-Cloud/m-p/1275958#M2061</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.alteryx.com/t5/user/viewprofilepage/user-id/516374"&gt;@KatyKab&lt;/a&gt;&amp;nbsp;.&lt;/P&gt;
&lt;P&gt;That is a great question!&lt;/P&gt;
&lt;P&gt;Assuming that the year is in every column of your 4-year database, and if not, you can extract the year from the sales for everyday date and create a column with the name transaction_date - make this an integer&lt;/P&gt;
&lt;P&gt;Next, create a new column that extracts the year form today (this to automate the process) and called it current_year (make this an integer), and also calculate last_year = current_year - 1&lt;/P&gt;
&lt;P&gt;Then you can add a filter to extract current_year and last_year.&lt;/P&gt;
&lt;P&gt;Finally, transpose the data. You should end up with something like:&lt;/P&gt;
&lt;P&gt;monthkey | everyday$$_last_year | product_attributes_last_year |&amp;nbsp;everyday$$_current_year | product_attributes_current_year&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This way you can perform calculations at the row level.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hope this helps&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":smiling_face_with_smiling_eyes:"&gt;😊&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 22 May 2024 15:20:45 GMT</pubDate>
    <dc:creator>javier_rios</dc:creator>
    <dc:date>2024-05-22T15:20:45Z</dc:date>
    <item>
      <title>Sales Comparison with LY and CY in Cloud</title>
      <link>https://community.alteryx.com/t5/Alteryx-Designer-Cloud-Discussions/Sales-Comparison-with-LY-and-CY-in-Cloud/m-p/1258991#M2015</link>
      <description>&lt;P&gt;Hi, I would like to know How can I calculate the LY (Last Year) in a database of 4 years, I want to compare LY and CY (Current Year). I have a database with the monthkey, Sales for everyday$$, product attributes, Thank you for your help.&lt;/P&gt;</description>
      <pubDate>Sat, 06 Apr 2024 00:15:29 GMT</pubDate>
      <guid>https://community.alteryx.com/t5/Alteryx-Designer-Cloud-Discussions/Sales-Comparison-with-LY-and-CY-in-Cloud/m-p/1258991#M2015</guid>
      <dc:creator>KatyKab</dc:creator>
      <dc:date>2024-04-06T00:15:29Z</dc:date>
    </item>
    <item>
      <title>Re: Sales Comparison with LY and CY in Cloud</title>
      <link>https://community.alteryx.com/t5/Alteryx-Designer-Cloud-Discussions/Sales-Comparison-with-LY-and-CY-in-Cloud/m-p/1259467#M2017</link>
      <description>&lt;P&gt;Without knowing your data structure, I'd likely:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;use a Formula to label LY vs CY vs non-CY-or-LY&lt;/LI&gt;&lt;LI&gt;Filter to only CY and LY&lt;/LI&gt;&lt;LI&gt;Summarize, grouping on your label column and summing sales&lt;/LI&gt;&lt;/UL&gt;</description>
      <pubDate>Mon, 08 Apr 2024 13:22:58 GMT</pubDate>
      <guid>https://community.alteryx.com/t5/Alteryx-Designer-Cloud-Discussions/Sales-Comparison-with-LY-and-CY-in-Cloud/m-p/1259467#M2017</guid>
      <dc:creator>alexnajm</dc:creator>
      <dc:date>2024-04-08T13:22:58Z</dc:date>
    </item>
    <item>
      <title>Re: Sales Comparison with LY and CY in Cloud</title>
      <link>https://community.alteryx.com/t5/Alteryx-Designer-Cloud-Discussions/Sales-Comparison-with-LY-and-CY-in-Cloud/m-p/1275958#M2061</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.alteryx.com/t5/user/viewprofilepage/user-id/516374"&gt;@KatyKab&lt;/a&gt;&amp;nbsp;.&lt;/P&gt;
&lt;P&gt;That is a great question!&lt;/P&gt;
&lt;P&gt;Assuming that the year is in every column of your 4-year database, and if not, you can extract the year from the sales for everyday date and create a column with the name transaction_date - make this an integer&lt;/P&gt;
&lt;P&gt;Next, create a new column that extracts the year form today (this to automate the process) and called it current_year (make this an integer), and also calculate last_year = current_year - 1&lt;/P&gt;
&lt;P&gt;Then you can add a filter to extract current_year and last_year.&lt;/P&gt;
&lt;P&gt;Finally, transpose the data. You should end up with something like:&lt;/P&gt;
&lt;P&gt;monthkey | everyday$$_last_year | product_attributes_last_year |&amp;nbsp;everyday$$_current_year | product_attributes_current_year&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This way you can perform calculations at the row level.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hope this helps&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":smiling_face_with_smiling_eyes:"&gt;😊&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 22 May 2024 15:20:45 GMT</pubDate>
      <guid>https://community.alteryx.com/t5/Alteryx-Designer-Cloud-Discussions/Sales-Comparison-with-LY-and-CY-in-Cloud/m-p/1275958#M2061</guid>
      <dc:creator>javier_rios</dc:creator>
      <dc:date>2024-05-22T15:20:45Z</dc:date>
    </item>
  </channel>
</rss>

