Forum Discussion
Anonymous
5 years agoNot applicable
Dynamic Month Slicer
Hi, I want to select dynamically last 4 month .It should select last 4 months and unselect other months dynmically.Month is coming from calendar table.Any idea how to do this?
amitchandak
5 years agoSuper User
Anonymous , There no way unless you try a slicer like that and use that for selection
Month Type = Switch( True(),
eomonth([Date],0) = eomonth(Today(),-1),"Last Month" ,
eomonth([Date],0)= eomonth(Today(),0),"This Month" ,
Format([Date],"MMM-YYYY")
)
or
Month Type = Switch( True(),
eomonth([Date],0) >= eomonth(Today(),-3) && eomonth([Date],0) <= eomonth(Today(),0),"Last 4 Month" ,
Format([Date],"MMM-YYYY")
)