Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
Solved! Go to Solution.
Hi @mra1984 ,
You can try EDATE() function, please refer to the measure below.
Measure = CALCULATE(SUM('Table'[value]),FILTER('Table','Table'[date]<=EDATE(SELECTEDVALUE('Table 2'[Date]),-12)&&'Table'[date].[Year]=2019))
Best Regards,
Jay
Community Support Team _ Jay Wang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Not sure you tried datesytd or totalytd or not.
Use them with date calendar
YTD Sales = CALCULATE(SUM(raw[Value]),DATESYTD(('Calendar'[Date]),"12/31"))
Last YTD Sales = CALCULATE(SUM(raw[Value]),DATESYTD(dateadd('Calendar'[Date],-1,Year),"12/31"))
This Sales = CALCULATE(SUM(raw[Value]),DATESYTD((ENDOFYEAR('Calendar'[Date])),"12/31"))
Last YTD complete Sales = CALCULATE(SUM(raw[Value]),DATESYTD(ENDOFYEAR(dateadd('Calendar'[Date],-1,Year)),"12/31"))
Last to last YTD Sales = CALCULATE(SUM(raw[Value]),DATESYTD(dateadd('Calendar'[Date],-2,Year),"12/31"))
Year behind Sales = CALCULATE(SUM(raw[Value]),dateadd('Calendar'[Date],-1,Year))
"12/31" is a way to mention where the year will end. So it will take the start of the year based on that
Hi @mra1984 ,
You can try EDATE() function, please refer to the measure below.
Measure = CALCULATE(SUM('Table'[value]),FILTER('Table','Table'[date]<=EDATE(SELECTEDVALUE('Table 2'[Date]),-12)&&'Table'[date].[Year]=2019))
Best Regards,
Jay
Community Support Team _ Jay Wang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @mra1984 ,
Check the DAX functions for PREVIOUS YEAR and SAMEPERIODLASTYEAR.
https://docs.microsoft.com/en-us/dax/previousyear-function-dax
https://docs.microsoft.com/en-us/dax/sameperiodlastyear-function-dax
Thanks,
Pragati
yes I am aware but I can you show where in the DAX you would put it to get it to work?