YTD value not showing sub total

Good day team

I am creating YTD values vs Prior year. I watched the videos https://www.youtube.com/watch?v=zYIxukD2KCM and i get the formula working for Prior year but my issue is that is doesnt show the subtotal. Values appear when i reference the date only.

DAX :

Prior Sales = IF(LASTDATE(‘Time’[Date] ) > TODAY() ,
BLANK(),
CALCULATE([Sales YTD],SAMEPERIODLASTYEAR(‘Time’[Date])))

when using this without date:

image

Am i doing something wrong?

Hello @neilonbooysen,

Thank You for posting your query onto the Forum.

To fix the grand totals write a small measure. Below is the measure provided for the reference -

Prior Sales - Totals =
SUMX(
   SUMMARIZE(
       Dates , 
       Dates[Date] , 
       "@Totals" , 
       [Prior Sales] ) , 
   [@Totals]
)

I’m providing a link below of the post which one of our expert has created onto the forum which addresses specifically this type of issue. Below is the link of that post provided for the reference.

Hoping you find this useful and meets your requirements that you’ve been looking for. :slightly_smiling_face:

Note: Please incorporate the naming conventions accordingly as per your file.

Thanks and Warm Regards,
Harsh

1 Like

Hi Harsh,

Thanks for the response, stupid question here. Does this new DAx Replace the other Prior Sales?

Thanks Harsh, managed to figure it out. thanks for all the help.

Best,
Neilon