Forum Discussion
Automatic Slicer
- Anonymous6 years ago
Managed to get around this by putting a case statement into my SQL view that would show the previous months data.
case when LEFT(CONVERT(varchar,DATEADD(MONTH,-1,GETDATE()),112),6) = SnapshotPeriod then 1 else 0 end as IsCurrentMth.
I then merged the 1 from IsCurrentMth with the standard SnapshotPeriod to get my new slicer.
Hi v-easonf-msft ,
If the slicer date E.G. 201912 was coming from a column in a SQL view, would there be an alternative way to make it default to current month in the slicer?
Thanks
Liam
Managed to get around this by putting a case statement into my SQL view that would show the previous months data.
case when LEFT(CONVERT(varchar,DATEADD(MONTH,-1,GETDATE()),112),6) = SnapshotPeriod then 1 else 0 end as IsCurrentMth.
I then merged the 1 from IsCurrentMth with the standard SnapshotPeriod to get my new slicer.