Forum Discussion
WouterAalders
4 years agoNew Member
Change date format on slicer
Hello everyone, At the moment i have slicers like this, but i would like to change the format so that it shows YY instead of YYYY. so that it would show 15 16 17 18 19 20 21. Is this possible and ...
- 4 years ago
Hi WouterAalders ,
Based on my test, we can not format a four-digit integer to a two-digit number. So you have to add a new column in your code, like this.
Calendar = ADDCOLUMNS( CALENDAR(DATE(2019,1,1),TODAY()), "Year", YEAR([Date]), "YearFromat", FORMAT([Date], "yy") )
Best Regards,
Winniz
SpartaBI
Community Champion
4 years agoYou can't format 2022 to 22. It's a number, not a date.
You can:
1. Create another column that will have those numbers you want and use it for the slicer.
2. What you probably saw is that you can format a date column in this custom way. So let's say for each year I would have a date with the first day of the year on the entire rows of that year I could format it as "yy".
In case it answered your question please mark this as a solution for community visibility. Appreciate Your Kudos 🙂