+ Reply to Thread
Results 1 to 2 of 2

Trying to create measure to calculate for 'Sameperiodlastyear'

  1. #1
    Forum Contributor
    Join Date
    08-03-2021
    Location
    London
    MS-Off Ver
    365
    Posts
    611

    Trying to create measure to calculate for 'Sameperiodlastyear'

    Hi,
    I'm following a tutorial, where we're calculating the % difference between years, standard formula; Current period - Previous period / Previous period.
    But as we're in a data model using DAX functions;

    CALCULATE(Total sales measure, SAMEPERIODLASTYEAR(dDate[Year]))

    dDate is the date table created from the sales table. I continually get an error message and can't get the 'alert' to show what the error is.

    I've attached the workbook, and the measure ' previous' can be seen in data model fSales table.
    The pivot table for which the measure is to be used is on sheet 1 .


    Richard.
    Attached Files Attached Files

  2. #2
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,445

    Re: Trying to create measure to calculate for 'Sameperiodlastyear'

    Click in the Pivot Table
    Right click on the measure (Previous)
    Choose "Edit Measure..."
    Click on "Check DAX Formula"

    This formula is invalid or incomplete: 'Calculation error in measure 'fSales'[Previous]: A column specified in the call to function 'SAMEPERIODLASTYEAR' is not of type DATE. This is not supported.'.
    Attached Files Attached Files
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


+ 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. Issue with Sameperiodlastyear function
    By SalesAnalyst in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 09-05-2021, 02:21 PM
  2. [SOLVED] Measure Calculate YTD versus Last YTD
    By EFA10 in forum Excel Formulas & Functions
    Replies: 11
    Last Post: 08-19-2020, 10:20 AM
  3. PowerPivot SamePeriodLastYear
    By ibuhary in forum Excel Charting & Pivots
    Replies: 1
    Last Post: 11-03-2015, 09:00 AM
  4. [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
  5. 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
  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