Forum Discussion

saris02's avatar
saris02
New Member
7 years ago
Solved

YTD YA performance

Hi There!

 

I am struggling with YTD YA measure - I have checked the similar posts, and used the same logic - and if I check the data with power BI publisher for excel, in excel I get incorrect results.

Could someone please check my below lines and advise how can I get the correct data even in the excel add-in?

 

Value YTD TY = TOTALYTD (SUM (Sales[Sales Value]) ; 'Date'[Date] )          <- this is working fine

 

Value YTD YA? =
CALCULATE ( [Value YTD TY] ; SAMEPERIODLASTYEAR ('Date'[Date]) )       <- in case of year ago I have all 2017 data available, and it calculates the sales from Jan 1 till Dec 31, does not sums the date till the last available in 2017

 

Many thanks in advance!

Szilvi

  • saris02's avatar
    saris02
    7 years ago

    Hi Lin!

     

    Thanks a lot for your feedback - yesterday evening I managed to fix my problem, and it's working now :)

     

    Have a great weekend,

    Cheers,

     

    Szilvi

2 Replies

  • v-lili6-msft's avatar
    v-lili6-msft
    Community Support

    HI, saris02

    The second formula is to calculate last year's YTD.

    and it works well

    For example

    And if the date hierarchy is include day,  it will calculate the sales from Jan 1 till Dec 31.

     

    If it is not your case, please share pbix file or some data sample and expected output . You can upload it to OneDrive or Dropbox and post the link here. Do mask sensitive data before uploading.

     

    Best Regards,

    Lin

     

     

     

    • saris02's avatar
      saris02
      New Member

      Hi Lin!

       

      Thanks a lot for your feedback - yesterday evening I managed to fix my problem, and it's working now :)

       

      Have a great weekend,

      Cheers,

       

      Szilvi