Forum Discussion

Kray's avatar
Kray
Helper I
8 years ago
Solved

SAMEPERIODLASTYEAR Function Lack

Hello, 

 

I use this function very well but there is a lack , if the product was not sold on current month-week-year yet you cant see the last year sales. how can I see the last year data within this condition? 

  • Anonymous's avatar
    Anonymous
    8 years ago

    Kray

    Change the SamePeriodLastYear measure to the following, you will get value in Feb.

    SamePeriodLastYear = CALCULATE([sale],SAMEPERIODLASTYEAR(TAKVIM[Date]))


    Regards,
    Lydia

7 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    Kray.

    Could you please share sample data of your table and post expected result here? In my scenario, SAMEPERIODLASTYEAR function works well.



    Regards,
    Lydia

    • Kray's avatar
      Kray
      Helper I

      Sure, I choosed X category , my first pic is 2017 and second one is 2016 .  At the first pic , last february has to show 835.944 but it doesnt because in 2017 there is no any sales in the X category.

       

       

       

       

       

       

       

       

      • Anonymous's avatar
        Anonymous
        Not applicable

        Kray,


        When you use Year, MonthName fields and the measure to create visual, do you get data in February? And could you please paste the data of your tables in Excel file and share us the Excel file via OneDrive?

        Regards,
        Lydia