+ Reply to Thread
Results 1 to 2 of 2

How to calculate discount in PowerPivot??

  1. #1
    Registered User
    Join Date
    05-14-2013
    Location
    Hyderabad
    MS-Off Ver
    Excel 2010
    Posts
    15

    Cool How to calculate discount in PowerPivot??

    Hi all,

    This is a cross post from MrExcel.Com where I have no luck in getting a reply for this.

    I have a problem with calculating discount in PowerPivot analysis. I have dCalendar , dDiscount, fSa*****ok .

    dDiscount columns:

    DiscKey, StartDate, EndDate, Product, DiscountName, DiscountPercent

    fSalebook columns:

    OrderDate, Product, Qty, Sales, Discount

    dCalendar columns:

    Date, Holiday, MonthNo, MonthName, QuarterNo, QrtName, Year.


    The problem (at least I feel) is I defined some dates in the Startdate and Enddate for a particular year. But these discounts should apply for all of the years in my fSa*****ok, not just for that year in the dDiscount table.

    So in essence, when you calculate discount for a product in fSa*****ok you should consider only the month and day of the transaction, if the sale is in between the discount dates.

    PS: One more clause, Sometimes I offer discount only for a particular product in that Discount season, that's why there is a column for Product in the dDiscount table.

    What should be my DAX formula to calculate Row level discount in fSalesBook??
    Thank you so much for your help!

    mrxlsx
    Last edited by mrxlsx; 06-12-2015 at 10:27 PM. Reason: aded one more line

  2. #2
    Registered User
    Join Date
    05-14-2013
    Location
    Hyderabad
    MS-Off Ver
    Excel 2010
    Posts
    15

    Re: How to calculate discount in PowerPivot??

    Hi,

    Here is the link for the sample workbook. I have the following relationships.


    Table [Column] -------> Table [Column]

    fSalesBook[OrderDate] --------> dCalendar[Date]

    I am not sure how to relate the dDiscount table with the dCalendar table and not sure even there is a need to relate them to calculate Row level discount in fSalesBook. You can change the relations/model if there is need be.


    https://drive.google.com/file/d/0B6G...ew?usp=sharing

    mrxlsx

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. PowerPivot - how to calculate next month's value?
    By illusionek in forum Excel General
    Replies: 9
    Last Post: 01-28-2015, 09:58 AM
  2. Macro to calculate discount
    By amarjeet.it in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-22-2013, 08:55 AM
  3. calculate % discount for full column
    By jordanturner in forum Excel General
    Replies: 11
    Last Post: 09-16-2010, 09:06 AM
  4. calculate the value of a mortgage purchased at a discount
    By Jim@cch in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 09-06-2005, 02:05 AM
  5. calculate the value of a mortgage purchased at a discount
    By Jim@cch in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 09-06-2005, 12:05 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1