+ Reply to Thread
Results 1 to 12 of 12

Measure Calculate YTD versus Last YTD

  1. #1
    Registered User
    Join Date
    05-14-2020
    Location
    Belgium
    MS-Off Ver
    0365
    Posts
    36

    Angry Measure Calculate YTD versus Last YTD

    HI,

    I have created a formula in my Power Query & Data Model (With Calendar), to compare the sales for 2020 (till end of June) and the same result for 2019/2018 (end of june).
    Formula is "CALCULATE'('DATA[Total Invoice];SAMEPERIODLASTYEAR('Calender[Date])
    Result is correct when I am looking in details, on 30/06/2019 I have the correct amount but the final result in the Measure*is the Total of 31/12/2019 and not at the same period for 2020 > 30/06/2020.

    How can I have the total for the same period > end of invoicing of 2020, now is 30/06 but next month it will be 31/07...
    I don't want to use the filter by a slicer, I would like like to have the formula independant of the slicer.

    Thanks for your help.
    Nice Weekend.
    Eric

  2. #2
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: Measure Calculate YTD versus Last YTD

    Make a column in the original data and use a if statement to refer to that criteria ("yes"). After that you can make a pivot table and add the criteria in the filter box and select on "yes".
    Notice my main language is not English.

    I appreciate it, if you reply on my solution.

    If you are satisfied with the solution, please mark the question solved.

    You can add reputation by clicking on the star * add reputation.

  3. #3
    Registered User
    Join Date
    05-14-2020
    Location
    Belgium
    MS-Off Ver
    0365
    Posts
    36

    Re: Measure Calculate YTD versus Last YTD

    Hi,

    Thank You for your advice.
    Can you explain with an example or the formula for the statement.
    Many thanks.

    Eric

  4. #4
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: Measure Calculate YTD versus Last YTD

    You want help, so I expect you could make an example that shows your problem. Please add also manualy the expected result.

  5. #5
    Registered User
    Join Date
    05-14-2020
    Location
    Belgium
    MS-Off Ver
    0365
    Posts
    36

    Re: Measure Calculate YTD versus Last YTD

    See below, POST resolved
    Last edited by EFA10; 08-19-2020 at 03:41 AM.

  6. #6
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,557

    Re: Measure Calculate YTD versus Last YTD

    Please utilize the instructions in the banner at the top of the page to upload the .xlsx file from which the screen shot in post #5 is taken.
    Let us know if you have any questions.
    Consider taking the time to add to the reputation of everybody that has taken the time to respond to your query.

  7. #7
    Registered User
    Join Date
    05-14-2020
    Location
    Belgium
    MS-Off Ver
    0365
    Posts
    36

    Re: Measure Calculate YTD versus Last YTD

    Hi,

    Here is my example with the problem of LYTD.
    Thanks.

    Eric
    Attached Files Attached Files

  8. #8
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,557

    Re: Measure Calculate YTD versus Last YTD

    Maybe not the most elegant of solutions, however have you considered adding a timeline?
    Pivot Table Tools > Analyze > Insert Timeline
    Select January 2018 through June 2020.
    Let us know if you have any questions.

    Edit: there is also a section, "USING THE DATA MODEL", of the article linked below which may be helpful.
    https://sfmagazine.com/post-entry/ap...a-pivot-table/
    Last edited by JeteMc; 08-17-2020 at 01:48 PM.

  9. #9
    Registered User
    Join Date
    05-14-2020
    Location
    Belgium
    MS-Off Ver
    0365
    Posts
    36

    Re: Measure Calculate YTD versus Last YTD

    Hi,

    Yes we can use the timeline but this is not a solution for me.
    Kind regards,

    Eric

  10. #10
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,557

    Re: Measure Calculate YTD versus Last YTD

    Here is a proposal based on oeldere's suggestion, except instead of adding the column to the source data it is added to the calendar.
    The column header is Include and the formula is: =AND(MIN(Table1[Date])<='Calendar'[Date],MAX(Table1[Date])>='Calendar'[Date])
    Include is then used as the filter for the pivot table.
    Let us know if you have any questions.
    Attached Files Attached Files

  11. #11
    Registered User
    Join Date
    05-14-2020
    Location
    Belgium
    MS-Off Ver
    0365
    Posts
    36

    Re: Measure Calculate YTD versus Last YTD

    Thank You, it is working fine.

  12. #12
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,557

    Re: Measure Calculate YTD versus Last YTD

    You're Welcome and thank you for the feedback. Please take a moment to mark the thread as 'Solved' using the thread tools menu above your first post. I hope that you have a blessed day.

+ 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. Pivot Table: Grand Total different measure from Column measure
    By chinneywow in forum Excel Charting & Pivots
    Replies: 0
    Last Post: 08-07-2019, 06:22 AM
  2. Suggestions to calculate short term yeild versus draw-down data.
    By Avara in forum Excel Charting & Pivots
    Replies: 0
    Last Post: 07-20-2015, 06:20 AM
  3. [SOLVED] Help Needed with Power Pivot Calculate Measure
    By rv02 in forum Excel Charting & Pivots
    Replies: 0
    Last Post: 05-13-2015, 10:09 AM
  4. Calculate issue accross two differetn tables in a measure
    By concatch in forum PowerPoint Formatting & General
    Replies: 0
    Last Post: 04-24-2013, 09:28 AM
  5. [SOLVED] 3,000 Tables versus 3,000 Worksheets versus 3,000 Workbooks
    By StevenM in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 05-18-2012, 03:15 AM
  6. Formula to calculate measure change in numbers
    By drdrez in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 11-30-2009, 02:01 AM
  7. [SOLVED] How do I calculate the statistical measure known as omega?
    By macrohunter in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 03-13-2006, 11:10 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