cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
kenny_i Member
Member

How to create Month & Year slicers from datetime?

I have datatime column. I would like to create slice time dimention. How to do?

1 ACCEPTED SOLUTION

Accepted Solutions
jsh121988 Regular Visitor
Regular Visitor

Re: How to create Month & Year slicers from datetime?

Create a new Calculated Column on your table, then set it as the slicer field:

 

Year Month = FORMAT([MyDateTime], "yyyy mmm")

You'll also need a Year Month Sort column to have the months sorted in order:

Year Month Sort = FORMAT([MyDateTime], "yyyymm")

Under the Modeling tab, set the Sort By for [Year Month] to [Year Month Sort]

 

1 REPLY 1
jsh121988 Regular Visitor
Regular Visitor

Re: How to create Month & Year slicers from datetime?

Create a new Calculated Column on your table, then set it as the slicer field:

 

Year Month = FORMAT([MyDateTime], "yyyy mmm")

You'll also need a Year Month Sort column to have the months sorted in order:

Year Month Sort = FORMAT([MyDateTime], "yyyymm")

Under the Modeling tab, set the Sort By for [Year Month] to [Year Month Sort]