Results 1 to 2 of 2

Thread: SamePeriodLastYear only works if PivotTable has Year Month in ROW field but not when in Column
Thanks Thanks: 0 Likes Likes: 0

  1. #1
    Board Regular
    Join Date
    Dec 2004
    Posts
    669
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default SamePeriodLastYear only works if PivotTable has Year Month in ROW field but not when in Column

    I am using this from sample on web to get for Mar, last year Mar amount:-


    Last year:=CALCULATE(

    SUM('Transaction'[Quantity]),

    SAMEPERIODLASTYEAR(Calendar[Date])

    )

    It works only if the layout of my Pivot has Year and Month on Row Field.
    However, my report layout is always
    Year in page field, and Months on Column field.

    I tried this layout with this measure then it render errors.
    What can I do ?

    Thanks in advance.

  2. #2
    Board Regular
    Join Date
    Dec 2004
    Posts
    669
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default Re: SamePeriodLastYear only works if PivotTable has Year Month in ROW field but not when in Column

    I found actually if I put both Year and Month as Column it works,
    But if I move Year to Page field, this error comes up

    'SAMEPERIODLASTYEAR' only works with contiguous date selections.
    This is very strange as :-

    Year and Month in column fields it works
    Year in page and Month as Column then come to this error.

    What can we do here ?
    Thanks

Some videos you may like

User Tag List

Tags for this Thread

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

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