Forum Discussion

Aditya_Vikki's avatar
Aditya_Vikki
New Member
4 years ago
Solved

SAMEPERIODLASTYEAR() function not working

2 Replies

  • Hi,

    Why have you create a complicated structure?  In the Date Final table, create a Quarter column.  There should be a Many to One and Single relationship from the Date column of the Tables A and B to the Date column of the Date Final Table.  To your slicers, drag Quarter and Month from the Date Final Table.

    Hope this helps.

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

    Hi Aditya_Vikki ,

     

    I have tested it and it works. The DAX Guider you can refer. 

    SAMEPERIODLASTYEAR function (DAX) - DAX | Microsoft Docs

     

    Or you can try the equivalent formula:DATEADD(dates, -1, year)

     

    Pbix in the end you can refer.

    Best Regards

    Community Support Team _ chenwu zhu

     

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.