cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
mmishal001
Frequent Visitor

Is it possible to create a custom Date slicer on Power BI?

I'm looking for a date slicer (see below proof of concept)

 

See picture here: https://stackoverflow.com/questions/66075440/is-it-possible-to-create-a-custom-date-slicer-on-power-...

 

The main features should be:

-The selection is aggregated by month
-The text on top of the slicer should have the month and year just like how its illustrated above.


Any guidance on creating custom visualisations is appreciated!

1 ACCEPTED SOLUTION

Hi @mmishal001 

I think you want to use the option of Timeline slicer and you want to show MMM-YY in cells instead of only month in cells.

However it is not support in Timeline slicer, you can only add date type value into this slicer.

So if you use format function to build a new column with type of MMM-YY, it will show blank.

Try to turn on Display all in Lables. Year will show above the month.

1.png

If you still want to show MMM-YY, please try to use slicer visual and add you need to build a yearmonth column to sort the text type column.

MMM_YY = FORMAT('Date'[Date],"MMM-YY")
YearMonth = YEAR('Date'[Date])*100+MONTH('Date'[Date])

MMM_YY is text, and sort this column by YearMonth(Whole number).

2.png

Use Ctrl+left click to do multipe selections.

 

Best Regards,

Rico Zhou

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly. 

 

View solution in original post

9 REPLIES 9
RicoZhou
Community Support
Community Support

Hi @mmishal001 

Could you tell me if your problem has been solved? If it is, kindly Accept it as the solution. More people will benefit from it. Or you are still confused about it, please provide me with more details about your table and your problem or share me with your pbix file from your Onedrive for Business.

 

Best Regards,

Rico Zhou

pranit828
Super User II
Super User II

Hi @mmishal001 

Create a columns as 
MMM_YY = FORMAT('calendar'[Date],"MMM-YY")

for the slicer and download the below slicer from marketplace and use it.

pranit828_4-1612618817165.png

 




PBI_SuperUser_Rank@1x.png


Hope it resolves your issue? 
Did I answer your question? Mark my post as a solution!

Appreciate your Kudos, Press the thumbs up button!!
Linkedin Profile

thanks @pranit828 

 

This is the closest I could get - is there a way to add the year in addition to the three letter month name ("Nov-19" and not just "Nov")

mmishal001_0-1612638582290.png

 

HI @mmishal001 

Create the new column using DAX formula I mentioned in my previous post.

MMM_YY = FORMAT('calendar'[Date],"MMM-YY")

 Now, use this column in the timeline slicer.




PBI_SuperUser_Rank@1x.png


Hope it resolves your issue? 
Did I answer your question? Mark my post as a solution!

Appreciate your Kudos, Press the thumbs up button!!
Linkedin Profile

I did. And at first it was blank (maybe because the format was text)

 

I then changed the type to date format and it gave me the above result.

 

mmishal001_0-1612640570118.png

 

HI @mmishal001 

Try 

MMM_YY = LEFT('calendar'[Date].[Month],3) & "-" & RIGHT('calendar'[Date].[Year],2)

Or I can alreay see there is a column you have as "Month Year", use that.




PBI_SuperUser_Rank@1x.png


Hope it resolves your issue? 
Did I answer your question? Mark my post as a solution!

Appreciate your Kudos, Press the thumbs up button!!
Linkedin Profile

It's blank - tried existing column as well as the new column

mmishal001_0-1612642214857.png

 

Hi @mmishal001 

I think you want to use the option of Timeline slicer and you want to show MMM-YY in cells instead of only month in cells.

However it is not support in Timeline slicer, you can only add date type value into this slicer.

So if you use format function to build a new column with type of MMM-YY, it will show blank.

Try to turn on Display all in Lables. Year will show above the month.

1.png

If you still want to show MMM-YY, please try to use slicer visual and add you need to build a yearmonth column to sort the text type column.

MMM_YY = FORMAT('Date'[Date],"MMM-YY")
YearMonth = YEAR('Date'[Date])*100+MONTH('Date'[Date])

MMM_YY is text, and sort this column by YearMonth(Whole number).

2.png

Use Ctrl+left click to do multipe selections.

 

Best Regards,

Rico Zhou

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly. 

 

View solution in original post

negi007
Super User II
Super User II

@mmishal001 using chicklet slicer you can have the kind of visual you are looking for. Follow below steps

 

1. If you have a calender or date table, please create a column like below

Month_YY = LEFT('calendar'[Date].[Month],3) & "-" & RIGHT('calendar'[Date].[Year],2)
 
 Your date table would look like below
 
 
negi007_1-1612612416421.png

 

then using get more visual, import the chicklet slicer in your powerbi dataset and use the column created in step1 in this slicer

negi007_2-1612612449838.png

let me know if it helps you. thanks

 

 




Did I answer your question? Mark my post as a solution!
Appreciate your Kudos


Proud to be a Super User!

Follow me here


Helpful resources

Announcements
PBI User Groups

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

April Update

Check it Out!

Click here to read more about the April 2021 Updates!

secondImage

The largest Power BI virtual conference

100+ sessions, 100+ speakers, Product managers, MVPs, and experts. All about Power BI. Attend online or watch the recordings.

secondImage

Experience what’s next for Power BI

See the latest Power BI innovations, updates, and demos from the Microsoft Business Applications Launch Event.