Reg:Allocation on previous year actuals

Hi Experts,
                  I have an issue in allocation, i wrote allocation logic to allocate profit center by previous year actuals that was ok but if there are new profit center created for this year and there wont be any previous year actuals for it so he asks me to allocate the amount evenly to all the profit centers if that possile in Run allocation ?
the script below
*SELECT(%ACC%,"ID", "ACCOUNT", "TOPDOWNALLOC = 'Y'")
*SELECT(%CurrencyList%,"ID","RPTCURRENCY","CURRENCY_TYPE = 'R'")
*SELECT(%ENTI%,"ID","ENTITY","ID = %ENTITY_SET%" )
*SELECT(%CATE%,"ID","CATEGORY","ID = %CATEGORY_SET%" )
*SELECT(%TIME%,"ID","TIME","ID = %TIME_SET%" )
*SELECT(%PTC%,"ID","PROFIT_CTR","ID = %PROFIT_CTR_SET%" )
*XDIM_MEMBERSET RptCurrency = %CurrencyList%
*XDIM_MEMBERSET CATEGORY = %CATE%
*XDIM_MEMBERSET TIME = %TIME%
*XDIM_MEMBERSET ACCOUNT = %ACC%
*XDIM_MEMBERSET PROFIT_CTR = %PTC%
*FOR %ACCT%=%ACC%
*RUNALLOCATION
*FACTOR = USING/TOTAL
*DIM ENTITY WHAT =%ENTI%.INP ; WHERE=%ENTI%; USING=%ENTI%; TOTAL=%ENTI%
*DIM CATEGORY WHAT=%CATE%; WHERE=<<<; USING=ACTUAL; TOTAL= <<<
*DIM ACCOUNT WHAT=%ACCT%_INP; WHERE=BAS(%ACCT%); USING=BAS(%ACCT%); TOTAL=<<<
*DIM DATASRC WHAT=INPUT; WHERE=INPUT; USING=UPLOAD; TOTAL=<<<
*DIM PROFIT_CTR WHAT=BAS(%PTC%_IN); WHERE=BAS(%PTC%); USING=BAS(%PTC%); TOTAL=<<<
*DIM COSTCENTER WHAT= NO_COSTCENTER; WHERE=BAS(1004322231); USING=BAS(1004322231); TOTAL=<<<
*DIM TIME WHAT=BAS(%TIME%); WHERE=BAS(%TIME%); USING=BAS(2009.TOTAL) ; TOTAL=<<<
*DIM RPTCURRENCY WHAT=LC; WHERE=INR; USING=IN; TOTAL=<<<
*ENDALLOCATION
*COMMIT
*NEXT
Regards,
Vinoth

Hi Vinoth,
First, what REF_DATA is. Initially WHEN statement in BPC NW worked on members defined in your XDIM statements rather than records from your Application like in BPC MS. Starting from BPC NW 7.0 SP09 (7.5 SP04) default behavior of WHEN has been changed to be based on Application data. For compatibility purposes and to leave a choice of using Dimension data a new statement was introduced - *WHEN_REF_DATA. You can read in more details about it in OSS Note [Note 1474115 - Enable new keyword: *WHEN_REF_DATA for script logic|https://websmp130.sap-ag.de/sap(bD1lbiZjPTAwMQ==)/bc/bsp/spn/sapnotes/index2.htm?numm=1474115].
So, based on what Profit Centers you have to use you have to put either *WHEN_REF_DATA=MASTER_DATA or *WHEN_REF_DATA=TRANS_DATA.
I didn't understand why would you need multiple new Profit Centers. I can see 2 options of implementing your scenario:
1. You create an Input Schedule that allows user to enter number of Profit Centers. Than you use that number in your RUNALLOCATION.
2. You create a script that calculates number of Profit Centers and stores it in same Application. Than you use that number in your RUNALLOCATION.
a) Your script calculates total number of Profit Centers and puts it on member NO_PC. Than FACTOR = 1/USING will be in RUNALLOCATION
b) You populate value 1 on each Profit Center on some special Account. Than FACTOR = USING/TOTAL will be in RUNALLOCATION.
You have to decide first which path is more convenient for you. Some of the considerations I explained in my previous posting. After than we can proceed with developing that script; otherwise there are too many unknowns in that task.
Regards,
Gersh

Similar Messages

  • Reg:Allocation using UJR_WRITE_BACK

    Hi Experts,
                     I am doing allocation using badi based on previos year actuals.
                     I am using FM UJQ_RUN_RSDRI_QUERY to get the previous year actuals but the problem is that i have to use this FM
                     multiple times for every record.so it affects the performance of the system.
                     Can anyone send the sample code for this scenerio or helps me out in fetching database values effectively.
    Regards,
    Vinoth

    * Call SQE to read transaction data
    TRY.
        CALL FUNCTION 'UJQ_RUN_RSDRI_QUERY'
          EXPORTING
            i_appset_id       = lv_appset_id
            i_appl_id         = lv_application_id
            it_dim_name       = lt_dim_name
            if_check_security = abap_false
          IMPORTING
            et_data           = <lt_tx_data>.
      CATCH cx_ujq_exception.
    ENDTRY.
    I used this simple code and got all the records into the ITAB. hope this helps
    Sravan

  • In report painter GRR3 1VK  Actual Value picked up from previous year

    Dear Experts,
    In report painter GRR3 > 1VK
    1. Column of Actual Quantity to take in Basic Key Figure from Statistical Quantity
    2. The value is 4 (Actual) and Version is 0
    I found that the Actual value appeared are actually taken from the previous fiscal year. I have checked the line items and their document posting date it shown as last fiscal year.
    In this case, where should I amend to have the report pick up only actual value of this fiscal year? or Is there any value to maintain for GRR3 to pickup the current fiscal year actual posting?
    Thank you very much and Best Regards,
    Anne

    hi..
      Goto GRR3 > click on Lib 1VK it will show you all the report in 1VK library > select your report & double click on it
      It will display the report format. Then go to Edit at the top. you will find General data selection.click on it you will find available characteristics. Then goto GRR2 for making any change/selection for Fiscal year char
      If your report is a standard one you can not change. then copy the report from GRR1 and make the changes.
      You can also see the char in GR23 by selecting 1VK lib.
    kkumar
    Edited by: kkbdsp on Mar 11, 2011 9:21 AM

  • Capturing "Actual Amounts" from previous years

    Hi Experts,
    We had earlier developed a report to produce a list of projects which can be changed from status TECO to CLSD. If the project cannot be closed then the corresponding reason for failure should be displayed.
    Now the problem is that there were some direct costs which were booked under certain WBS elements. These elements were created in the previous year & haven't been settled in that year. Our present program isn't able to capture & display these costs in the current year. We have based our logic up on a join of table COBK with tables COEP, PROJ & PRPS. We are referring to the SAP standard TCODE s_alr_87013533 which is able to find the unsettled dollars (Actual amount) even from previous years. Anyone please help advise as to how we can even capture the actual amounts from previous years.
    Regards,
    Uday
    Our inner join statement is as shown below:
    SELECT coep~objnr coep~wogbtr coep~megbtr coep~wrttp coep~kstar
             coep~owaer coep~vrgng coep~sgtxt coep~ebeln coep~ebelp
             coep~objnr_n1 coep~belnr coep~gjahr coep~perio
             cobk~blart cobk~refbn cobk~refbk cobk~refgj
        INTO CORRESPONDING FIELDS OF TABLE tb_actual
        FROM coep INNER JOIN cobk ON cobk~kokrs = coep~kokrs AND
                                     cobk~belnr = coep~belnr
                  INNER JOIN prps ON coep~objnr = prps~objnr
                  INNER JOIN proj ON proj~pspnr = prps~psphi
        WHERE proj~pspnr  = wa_proj-pspnr   "project definition
          AND prps~pspnr  = wa_prps-pspnr   "WBS element
      AND prps~belkz =  c_x             "Account assignment
      AND coep~wogbtr <> 0              "amount
      AND coep~lednr = c_00             "Ledger (needed to hit index)
      AND coep~wrttp IN (c_04, c_11)    "actual value type - real & stat
      AND coep~beknz IN r_beknz.        "D/C Ind <> Settlement

    based on the data provided -
    I-001688               
    Cost line                       7143.28          71710000
    Cost line                     42874.74          73120000
    Cost line                     22752.77          73120000
    TOTAL COST     72770.79          
    Settlement line     65627.51          81650000
    Settlement line     7143.28          81650000
    TOTAL SETL     72770.79          
    you should be able to set CLSD to this project as there is no unsettled value in the project
    CJI3 report confirms that there is no outstanding settlement and hence project can be set to CLSD. This report shows all the line items against project
    The report S_ALR_87013533 shows the actual cost incurred in the project, but not settlement. This does not mean that the project is unsettled.
    see another report (project cost element report) - that might help you S_ALR_87013542

  • Actual - Previous Year not summing correctly

    Hi,
    I've tried two different MDX expressions to return the Actual GSV for this period last year.  They both work for individual periods but they don't sum correctly.
    Ie if you review the results for several periods in Excel then as long as the periods appear across or down the page the results are correct. However if Period is the Page Grouping (the Filter) then the result is wrong.
    The first expression doesn't return a total at all:
    Create Member CurrentCube.[Measures].[Actual - Gross Sales PY]
    As 
    ([Measures].[Actual - Gross Sales], 
    ParallelPeriod(
    [Date].[Period Hierarchy].[Fin Yr],1,
    [Date].[Period Hierarchy].currentmember)),
    NON_EMPTY_BEHAVIOR = { [Actual - Gross Sales] }, 
    VISIBLE = 1 ,  ASSOCIATED_MEASURE_GROUP = 'Monthly Sales Forecast'; 
    This version sums up all periods not just the two I've selected:
    Create Member CurrentCube.[Measures].[Actual - Gross Sales PY expt]
    As 
     Sum(EXISTING [Date].[Period Hierarchy].[Yyyy Period].MEMBERS,  
     ( ParallelPeriod( [Date].[Period Hierarchy].[Fin Yr],  
                       1,  
                       [Date].[Period Hierarchy].currentmember  
     ,[Measures].[Actual - Gross Sales])),
    NON_EMPTY_BEHAVIOR = { [Actual - Gross Sales] }, 
    VISIBLE = 1 ,  ASSOCIATED_MEASURE_GROUP = 'Monthly Sales Forecast'; 
    Any help would be much appreciated!

    Hi Walt,
    The “.CurrentMember” function doesn't handle the multiple members, it means the MDX cannot handle a multi-select in Excel. 
    If we are use SSRS report tool which allow us to pass a string into MDX query, it can hanlde multi-select request to get expected data. Here are some related threads about this topic for your reference, please see:
    Sum the same period of this and previous year: http://social.technet.microsoft.com/Forums/en-US/7d9ca803-faf1-4879-a4da-919b77907af8/sum-the-same-period-of-this-and-previous-year?forum=sqlanalysisservices
    SSAS MDX Get Previous Year data for a given date range, and day to day:
    http://social.technet.microsoft.com/Forums/sqlserver/en-US/92945862-371a-45d0-a5cb-648b2a4180ab/ssas-mdx-get-previous-year-data-for-a-given-date-range-and-day-to-day?forum=sqlanalysisservices
    Furthermore, I found a article regarding multi select – friendly time calculations in Analysis Services for your reference. Please see:
    http://ditchiecubeblog.wordpress.com/2013/06/16/multi-select-friendly-time-calculations-in-analysis-services/
    Regards,
    Elvis Long
    TechNet Community Support

  • Reg : Curr Month,Previous Month,Curr Month Previous Year

    Hi all ,
                 I have a req where I have to display the sales for
    Current Month               Sales value
    Previous Month             Sales value
        Curr Month                Sales 
    Previous Year
    Curr Month and Previous Month I got it with Time Series AGO Function .
    But current month for the Previous Year , I am not able to proceed .
    Kindly help.
    Reg,
    Niv D

    Hi NIV,
    You can use the same time series function to calculate current month of last year values.
    Ago (measure column , year , 1)
    it describes the last year sales of current month
    OBIEE -Time Series in OBIEE
    Regards,
    VG

  • Reg:-Previous Year Quarter

    Hi All,
    I need to build a new report on Balance Sheet Quarterly in Financials. My reqiurement is..Show the Quarterly Balance sheet comparing Curent Quarter and Previous year Quarter
    i.e Current Qtr vs Previous Year Qtr.
    In the report levl , I have used Presentation variable for Current Quarter:-FILTER("Facts - GL Balance"."Balance Global1 Amount" USING (Time."Fiscal Quarter" ='@{var_qtr}{2011 Q 1}'))
    In the Dashboard, I used two filters Fiscal Year, Fiscal Quarter.. So if select Fiscal Quarter 2011 Q2 then the user should also be able to see 2010 Q2 data.
    May I know how to achieve this.
    Thanx in advance.

    Hi all,
    I have built a report on Balance Sheet using following columns:
    1) General Ledger Code
    2) Current Quarter
    3) Previous Quarter
    4) Global Amount
    Now I got a new requirement to add a column Variance to the layout which should be difference of (Current Quarter- Previous Quarter).
    For current Quarter, we have used this formula :FILTER("Facts - GL Balance"."Balance Global1 Amount" USING (Time."Fiscal Quarter" ='@{var_qtr}{2011 Q 1}'))
    For Previous Quarter , we have used this formula:-FILTER("Facts - GL Balance"."Balance Global1 Amount" USING (Time."Fiscal Quarter" = ( case when substring('@{var_qtr}{2011 Q 1}' from 6 for 8)='Q 1' then cast(cast(substring('@{var_qtr}{2011 Q 1}' from 1 for 4) as int)-1 as char(4))||' '||'Q 4' when substring('@{var_qtr}{2011 Q 1}' from 6 for 8)='Q 2' then substring('@{var_qtr}{2011 Q 1}' from 1 for 4)||' '||'Q 1' when substring('@{var_qtr}{2011 Q 1}' from 6 for 8)='Q 3' then substring('@{var_qtr}{2011 Q 1}' from 1 for 4)||' '||'Q 2' else substring('@{var_qtr}{2011 Q 1}' from 1 for 4)||' '||'Q 3' end)))
    I need help how to calculate variance..

  • NoFilter vs Previous Year

    Hi All,
    I am new to BO/WEBI and I am facing an issue with a simple cost center report. My plan is to build a report with following structure
    Cost element │ Act. Month │ Plan Month │ Budget Full Year Current │ Budget Full Year Previous Year │
    and I am using following input controls
    Cost center (Single value)
    Fiscal Year/period (Single value)
    The columns contains following:
    Cost element: The Dimension “Cost element”
    Act. Month: The measure “Amount actual”
    Plan Month: The measure “Amount plan”
    Budget Full Year Current: The formula “Plan Total - Current year”
    Budget Full Year Previous: The formula “Plan Total - Previous year”
    The two formulas is made as below
    Plan Total - Current year:
    =NoFilter(Sum([Amount Plan])) Where ([Cost Center]=ReportFilter([Cost Center]) And [Fiscal year]=[Current year] And [Version]="Plan/actual version")  
    ([Current year] = Right([Fiscal year/period].[Fiscal year/period - Key];4) (I would have used Reportfilter, but for some reason it gives me all the values)
    Plan Total - Previous year
    =NoFilter(Sum([Amount Plan])) Where ([Cost Center]=ReportFilter([Cost Center]) And [Fiscal year]=[Previous Year] And [Version]="Plan/actual version")
    [Previous Year] = Left(Right([Fiscal year/period].[Fiscal year/period - Key];4);2)+ If(Right(ReportFilter([Fiscal year/period]);4)="2012";"11";If(Right(ReportFilter([Fiscal year/period]);4)="2013";"12";"13"))
    Now I am facing following issues
    The column “Budget Full Year Previous Year” is blank (properly due to a  #Multivalue-issue). How do I fix this?
    Is there a smarter way to find “Budget Full Year Current” and “Budget Full Year Previous”
    The column “Plan Total - Current year” is working, but this is properly because the variable choose all the year and the Input control filters the right year
    Thanks in advance
    Peter

    Hi Gill
    Yes I am using Bex as my data source. I have asked IT to make the selection within Bex, but it created some new issues
    IT made a measure for Budget Full Year Previous, which was based on Current year - 1. Unfortunately this only worked if the users choose this year (2014) and the Budget Full Year Previous would then be 2013. If the user select fx August 2013 the Budget Full Year Previous will again be 2013
    As an alternative IT suggested the selection should be in a prompt on the query. This could maybe work, but my report is quite slow so the user has to wait approx 2½ min each they change period.
    Thanks for reply
    Peter  

  • Reset previous year cleared item

    Dear experts,
    i am trying to reset previous year vendor cleared document in transaction FBRA.
    while doing system is giving message "Archiving has not finished"
    message no:F5682.
    is there any transaction code is there to reset previous year cleared item?
    we are using ECC 5.0 version.
    Regards
    babu..

    Dear Babu,
               The error message F5 682 is raised due to the check described                   
    in note 210134. Due to program design this check is also done for a                        
    'planned' archiving job, not only for actual 'running' archiving job,                      
    as a 'planned' archiving job could be running the next month, and then                     
    cause inconsistencies if for a document that is selected in this archive                   
    run, the clearing is reversed on the same time.                                                                               
    As assuring data consistency in archiving has a very high priority this                    
    check on 'planed' archiving jobs is done and is not planed to be                           
    changed in future.                                                                               
    Solution:                                                                               
    Follow recommendations of note 210134, and check your live Customizing                     
    in table T070 and T071 via Transaction OBR7/OBR8.                                          
    Only with regard to the life do potentially archivable documents                           
    cause problems for the resetting of cleared items.                                                                               
    Also, as you may known, please check that there are no invalid /                           
    incomplete archiving sessions within your system via SARA -> Management.                                                                               
    Within transaction SARA (archiving object FI_DOCUMNT) you have to press                    
    the 'Managment' button to see the status of the different archiving runs                   
    . Making a click on the incomplete archiving session you get a popup,                      
    where you can mark the flag 'Invalid session'.                                                                               
    By marking this field you are declaring the contents of this archive                       
    file as invalid. Therefore the archive can no longer be interpreted. The                   
    archiving session can no longer be chosen for subsequent processes such                    
    as Read, Delete etc.                                                                               
    OR                                                                               
    Delete the archive jobs that are scheduled to run.                                         
    I hope this helps.
    Mauri

  • How to display the Previous years

    Hi
      CJE0 - 12KST1A costs:budget/actual/commt/rem.plan/assd
    How to display the previous years budget in above mentioned report. at present the report is showing only cumulative value of previous years,2009 and 2010.....
    My requirement is from 2005 to 2009 i want display the value in this report, please through some light on this.
    Thanks
    S.Murali

    Hi
    But i want check the previous years budget for some number of projects not one by one, because the number of project are more.
    The above mentioned solution is for one by one i can check the pervious years budget. But my requirement is collective.
    Thanks
    S.Murali

  • Previous year figures in planning book

    Hi all,
    I want to show the previous year figures in the planning book.
    According the help documentation of planning books it must be possible to add actual data and previous year figures (Demand Planning - Demand Planning Process - Planning book design - Planning book: "Add rows containing actual data from the current year and/or the previous year").
    Actual data is easy by refering to 000 version. But how can I add previous year data?
    Thanks for your help
    Jean

    I think what it means is that if you go to the dataview tab in the Planning book design you can see a field called Initial Column.
    If you use initial column you will be able to add all the buckets in the period previous to the first future period. Its not necessarily last year but previous periods.
    (though i dont understand what you menat by seeing actual using 000 version)
    It makes more sense in an SNP planning book for a KF like Stock
    as the help says...
    "The initial column covers the time span from 1970 until the beginning of the first future period minus 1 second. The data is read from a key figure that is stored in liveCache orders or liveCache time series. However, you can also populate this column with data using a macro, such as has been done with the Initial stock key figure in the standard Supply Network Planning data view.
    Enter one of the following values:
    Blank - No initial column
    L - The initial column is displayed on the far left of the table.
    R- The initial column is displayed on the far right of the table.
    C - The initial column is displayed between the past planning horizon and the future planning horizon."

  • How we create Variable for Previous year for COPA reports

    Hi Guruss,
    I am making a COPA report for Current year comparison with previous year from KE31. For 1st column I have created the Variable for current year (which works perfectly) now in 2nd column i need the actual data pertaining to previous. So can any one please guide me how to create the variable for previous year.
    Thanks

    Thanks Jagannadha,
    I have create the variable for current year on KE3E. but i am confuse how i create the variable for previous year on KE3E.
    Waiting for reply.

  • Fiscal year period displaying previous years records tooo....

    Hi,
    I have built a query, which displays all the metrics like Year to date(YTD) Actuals and Plan, Month to date (MTD) Actuals and Plan, YTD Variance, MTD Variance, Remaining Balance etc... The query uses a customer exit to calculate the above metrics.
    Input filters are:
    Company Code: single value, mandatory,
    Fiscal Period: single value, mandatory
    Along with other characteristics , Fiscal period is also provided in free characteristics.
    Upon Execution (for eg:-) with input of fiscal period as 003/2008, the query displays the correct output for that year ie; 003/2008.
    But when the Fiscal Period is dragged from Free characteristics to the columns fields, it displays all the metrics for all the previous years records too. ie; it displays the values of 003/2007 along with 003/2008. The client does not want this to happen. It should display the values only for the period given as input.
    The client wants the fiscal period be provided in the free characteristics and not to remove it.
    Can anyone advise what could be done to prevent the query from displaying results of previous dates.
    Thanks in advance.
    Maddy

    What info-object are you using 0FISCPER or 0FISCPER3? Because 0FISCPER3 is just the fiscal period without year. So If you select Fiscal Period 3 it will give you the total for all years. If you are using 0FISCPER3 please change to 0FISCPER or user 0FISCPER3 together with 0FISCYEAR.

  • Previous year arrear

    Hi Experts,
    CLIENT IS USING LEGACY SYSTEM CURRENTLY.
    Currently the client is having FY from Feb - Mar. Now they are planning to streamline there process with standard and make FY from Apr - Mar.
    Now for FY 2007 employee has paid ITax upto Feb. In FY 2008 we are planning to include Mar 2007 salary. so now Form 16 will reflect 13 months salary (since he has not paid tax for Mar 2007).
    I want to upload the employee's Mar 2007 salary in system against the wagetype like previous year arrear and standard wagetype used for this purpose will be "Taxed but not paid" wagetype.
    (since employee has been paid Mar salary but no tax has been deducted)
    For achieving this I need to know the Taxable income and Exemptions for each employee for Mar 2007.
    I will upload the March payroll data for each employee and then find Taxable income and Exemptions, and thereafter calculate the net taxable income and then I'll suppy this amount to that employee in IT0015 against the wagetype "Taxed but not paid" in period Apr 2008.
    Please suggest whether I am proceeding in a right manner or if there can be a better way to achieve this or if this process may result in some problems.
    Regards,
    Tomesh
    Edited by: Tomesh Sahu on Jun 23, 2008 3:47 PM

    Hi Sur,
    /616  Add gross salary,It is related with section 89 relief ( claim of income tax difference)
    This wage type stores the differences between the gross actually paid and the gross salary including the arrears payment.
    The reason for creation of /616 is some employees  receives money/income  that of a previous period(arrears) or that of a future period in the current period , hence there is a change in Ptax and the employee can claim for the difference in PTax (section 89 Relief)
    Check table T511K and look at what value you maintained for S89SW
    Set the Value field to 1, if you want the system to compute Section  89(1) Relief for your employees.
    Set the Value field to 0 or leave the field blank, if you do not  want the system to compute Section 89(1) Relief for your employees.
    If you don't want to calculate it automatically please maintain  subtype 0004 in IT0588
    >Please Check  PCR IN89, and table S89 in payroll log ( from this table you can understand the process that creates /616 )

  • Getting the same day of the week from a previous year in a Power Query calc column

    Hi Power Query users,
    Would like to get your suggestions on this problem. I have a customer that wants to see the previous year's sales for the same day of the week. So today is Friday July 25, 2014. Customer would like to see sales for the closest Friday on the previous year,
    which was Friday July 26, 2013. Next year on Friday July 26, 2015, customer would see the sales for Friday July 25, 2014 and so on. Customer operates 7 days a week, all days of the year including holidays.
    What is the most elegant way to do this? I am assuming the best thing to do is to add this date as a calculated column in the date table, but I am not quite sure the best way to write the formula (including handling of edge cases - leap years, providing
    null when the previous year is not part of the date table, etc).
    I am starting with the
    date dimension as presented by Matt Masson.
    Please help if you have any formula suggestions for this.
    Thanks

    Okay, I'm making a couple of assumptions, so please let me know if these assumptions are incorrect:
    1) Instead of all sales data being in a single column, current year and last year sales are provided in different columns,
    2) The previous year sales column shows the sales occurring on the same
    date as the current year sales (so in your example, 43214 is the sales figure for 6/1/2013.
    If the above assumptions are true, we need to modify how the lookup is done. Let's assume that you created a custom column named SameDayOfWeekLastYear. Create another column called Previous Year Date, using the following function (Date_PreviousYear)
    (date) =>
    let   
        PreviousYearDate = Date.AddYears(date,-1),
        PreviousYearDateAdjusted = if (Date.Day(date)=29 and Date.Month(date) = 2) then
                                       #date(9999,1,1)
                                   else PreviousYearDate
    in
        PreviousYearDateAdjusted
    Incidentally, I created this function the week before your query, for a different purpose. In that case, it was to get the previous year sales occurring on the same
    date as the current year sales. It actually gets to your starting point, but with all the sales data in a single column to start with. However, when the current year is a leap year and you apply the Date.AddYears function, February 29th is calculated
    as February 28th of the previous year. If you then do a lookup for previous year sales, you get February 28th sales looked-up twice (the real Feb 28th and the bogus one resulting from taking February 29th back one year). The PreviousYearDateAdjusted identifier
    puts a truly bogus date instead of a duplicated Feb 28th - one that will always return null when looking up the sales value.
    This new date column will then be used to lookup the row of the previous year sales column that corresponds to the dates in the SameDayOfWeekLastYear column.
    Assuming that the last step in your query is InsertedCustom1, create another custom column (Previous Year Net_Same Day?), which returns the sales on the same day as the current year (the result that you're after). The formula would be:
    LookupValue(InsertedCustom1[Previous Year Net], InsertedCustom1[Previous Year Date], [SameDayOfWeekLastYear])
    where LookupValue is the custom function mentioned previously. After creating this new custom column, you can then remove all of the columns you don't need.
    Hope that the preceding is somewhat clear.

Maybe you are looking for