Forum Discussion
PowerRocky12
4 years agoHelper I
YTD Slicer
Hello, I am trying to create a YTD and full year Slicer for my report. In most of my charts its a 5 year comparision so I would want this slicer to work not just for the current year but everythi...
amitchandak
4 years agoSuper User
PowerRocky12 , Try like
YTD QTY forced=
var _max = today()
return
if(max('Date'[Date])<=_max, calculate(Sum('order'[Qty]),DATESYTD('Date'[Date])), blank())
//or
//calculate(Sum('order'[Qty]),DATESYTD('Date'[Date]),filter('Date','Date'[Date]<=_max))
//calculate(TOTALYTD(Sum('order'[Qty]),'Date'[Date]),filter('Date','Date'[Date]<=_max))
last two Comments are alternatives that can be used
- PowerRocky124 years agoHelper I
Hey, how will this help me create a slicer for my report though? I want a slicer that has "YTD" and "Full Year" Options.