Forum Discussion

jnpb's avatar
jnpb
Helper I
4 years ago
Solved

Issues generating a YTD from previous year

Hi everyone,  I'm trying to generate a YTD from the previous year and am either using an incorrect syntax or just not going about this the correct way. Working with PBI is not normally my area of ...
  • v-kkf-msft's avatar
    v-kkf-msft
    4 years ago

    Hi jnpb ,

     

    I think it should be because your date contains timestamp. You need to create a new Date column, like this. 

     

     

    Then change the measure to

     

    Measure = 
    CALCULATE (
        SUM ( 'Table'[NPSRecommend] ),
        SAMEPERIODLASTYEAR ( DATESYTD ( 'Table'[Date] ) )
    )

     

    If the problem is still not resolved, please provide detailed error information or the expected result you expect. Let me know immediately, looking forward to your reply.
    Best Regards,
    Winniz
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.