<?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 identify marketing trick (if holidays sales are fake) in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/identify-marketing-trick-if-holidays-sales-are-fake/m-p/610304#M177710</link>
    <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have a big store sales dataset and we may hear about marketing trick; the stores raise their prices when they have big discount rates on holiday sales. I want to investigate if this is true.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I used the following code but I realized that the results are weired as it gave me "marketing trick"=1 although I did not see any diference in the Price_ignore_discount and&amp;nbsp; orig_pricePerUnit (see screenshot), any advice will be greatly appreciated.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;
proc sort data=Superstore_Orders1 ; by Product_ID  ;run;

** Identiy if there is difference between the original unit price vs unit price excluding discount to assess if marketing trick is correct;
data orig_price; set Superstore_Orders1;
orig_pricePerUit= Unit_price;
where discount=0; run;


**merge both based on product_ID;
proc sort data=Superstore_Orders1; by product_ID;    proc sort data=orig_price; by product_ID;  run;
data Superstore_Orders1_merg; merge Superstore_Orders1  orig_price(in=i);  by product_ID;  if i; 
Price_ignore_discount=  Unit_price+(orig_pricePerUit* Discount  ); run;

data Superstore_Orders1_merg1; set Superstore_Orders1_merg;
if Price_ignore_discount GT  orig_pricePerUit then marketing_trick=1; else marketing_trick=0; run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="image.png" style="width: 600px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/34551iD7BE8CCEE6FAFE7E/image-size/large?v=v2&amp;amp;px=999" role="button" title="image.png" alt="image.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Sun, 08 Dec 2019 17:55:37 GMT</pubDate>
    <dc:creator>mrahouma</dc:creator>
    <dc:date>2019-12-08T17:55:37Z</dc:date>
    <item>
      <title>identify marketing trick (if holidays sales are fake)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/identify-marketing-trick-if-holidays-sales-are-fake/m-p/610304#M177710</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have a big store sales dataset and we may hear about marketing trick; the stores raise their prices when they have big discount rates on holiday sales. I want to investigate if this is true.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I used the following code but I realized that the results are weired as it gave me "marketing trick"=1 although I did not see any diference in the Price_ignore_discount and&amp;nbsp; orig_pricePerUnit (see screenshot), any advice will be greatly appreciated.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;
proc sort data=Superstore_Orders1 ; by Product_ID  ;run;

** Identiy if there is difference between the original unit price vs unit price excluding discount to assess if marketing trick is correct;
data orig_price; set Superstore_Orders1;
orig_pricePerUit= Unit_price;
where discount=0; run;


**merge both based on product_ID;
proc sort data=Superstore_Orders1; by product_ID;    proc sort data=orig_price; by product_ID;  run;
data Superstore_Orders1_merg; merge Superstore_Orders1  orig_price(in=i);  by product_ID;  if i; 
Price_ignore_discount=  Unit_price+(orig_pricePerUit* Discount  ); run;

data Superstore_Orders1_merg1; set Superstore_Orders1_merg;
if Price_ignore_discount GT  orig_pricePerUit then marketing_trick=1; else marketing_trick=0; run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="image.png" style="width: 600px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/34551iD7BE8CCEE6FAFE7E/image-size/large?v=v2&amp;amp;px=999" role="button" title="image.png" alt="image.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 08 Dec 2019 17:55:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/identify-marketing-trick-if-holidays-sales-are-fake/m-p/610304#M177710</guid>
      <dc:creator>mrahouma</dc:creator>
      <dc:date>2019-12-08T17:55:37Z</dc:date>
    </item>
    <item>
      <title>Re: identify marketing trick (if holidays sales are fake)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/identify-marketing-trick-if-holidays-sales-are-fake/m-p/610339#M177720</link>
      <description>&lt;P&gt;Please post example data in usable form (data step with datalines), so we have something to play around with.&lt;/P&gt;</description>
      <pubDate>Sun, 08 Dec 2019 22:09:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/identify-marketing-trick-if-holidays-sales-are-fake/m-p/610339#M177720</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2019-12-08T22:09:26Z</dc:date>
    </item>
  </channel>
</rss>

