Forum Discussion
Anonymous
6 years agoNot applicable
YTD Based on slicer
Hi, I would like to show YTD figure on the report based on month slicer. So if I choose Septemer from the Month slicer, the table will give me YTD figure from Jan-Sep, if I choose August from the mo...
amitchandak
Super User
6 years agoCheck if this can work for you
Sales YTD on LYTD =
Var _start_date=(minx('Date',STARTOFYEAR('Date'[Date])))
Var _end_date=(max('Date'[Date]))
Var _last_year_mtd_val= CALCULATE(sum(Sales[Sales Amount]),Sales[Sales Date] >= _start_date && (Sales[Sales Date]) <= _end_date,filter(Sales,COUNTROWS(SAMEPERIODLASTYEAR(Sales[Sales Date]))>0))
return
_last_year_mtd_valAppreciate your Kudos. In case, this is the solution you are looking for, mark it as the Solution.
Thanks.